• Xida Chen's avatar
    Ensure a PaintOp is rejected if the paint rect is empty · f3848cbc
    Xida Chen authored
    Currently a PaintOp is not necessary rejected even if its drawing
    canvas has a size of (0, 0). This should not be the case, for
    performance purpose, we should just skip this draw op.
    
    In PS#1, I added a test which fails without any code change,
    to indicate that we are not reject a PaintOp even if the canvas
    has size of 0.
    
    In PS#3, I added code changes to make the test pass. The
    code change ensures that if the paint rect is empty, then
    it should be skipped.
    
    Bug: 1157152
    Change-Id: I28110c26e838c917326df82bf1debdc67ca5b50d
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2585628
    Commit-Queue: Xida Chen <xidachen@chromium.org>
    Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#836660}
    f3848cbc
paint_op_buffer.cc 99.9 KB