Bug 89376 - [chromium] ContentLayerPainter should clear rect to be painted
Summary: [chromium] ContentLayerPainter should clear rect to be painted
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: James Robinson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-18 13:35 PDT by James Robinson
Modified: 2012-06-18 16:16 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.51 KB, patch)
2012-06-18 13:40 PDT, James Robinson
no flags Details | Formatted Diff | Diff
remove more redundant clears (4.70 KB, patch)
2012-06-18 13:41 PDT, James Robinson
no flags Details | Formatted Diff | Diff
clear in CanvasLayerTextureUpdater (4.60 KB, patch)
2012-06-18 15:55 PDT, James Robinson
enne: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Robinson 2012-06-18 13:35:10 PDT
[chromium] ContentLayerPainter should clear rect to be painted
Comment 1 James Robinson 2012-06-18 13:40:11 PDT
Created attachment 148164 [details]
Patch
Comment 2 James Robinson 2012-06-18 13:41:07 PDT
Created attachment 148165 [details]
remove more redundant clears
Comment 3 Stephen White 2012-06-18 13:59:28 PDT
Comment on attachment 148165 [details]
remove more redundant clears

The skia stuff looks ok, but I'll defer to enne or someone else more compositor-savvy for the rest.
Comment 4 Stephen White 2012-06-18 14:01:01 PDT
Oh, and could we get some test coverage for this?
Comment 5 Dana Jansens 2012-06-18 14:06:07 PDT
Comment on attachment 148165 [details]
remove more redundant clears

View in context: https://bugs.webkit.org/attachment.cgi?id=148165&action=review

> Source/WebCore/platform/graphics/chromium/ScrollbarLayerChromium.cpp:-120
> -        context.clearRect(contentRect);
> -        context.clip(contentRect);

Is the implication that the canvas will now be cleared by the added code in ContentLayerPainter? Cuz I don't see how that can be, or is this being removed for a different reason?
Comment 6 Adrienne Walker 2012-06-18 14:49:45 PDT
Comment on attachment 148165 [details]
remove more redundant clears

View in context: https://bugs.webkit.org/attachment.cgi?id=148165&action=review

> Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp:69
> +        SkPaint paint;
> +        paint.setAntiAlias(false);
> +        paint.setXfermodeMode(SkXfermode::kClear_Mode);
> +        canvas->drawRect(contentRect, paint);
> +        canvas->clipRect(contentRect);

I think this should maybe go in CanvasLayerTextureUpdater so that the root and scrollbars get cleared properly, since both of those use different painters other than ContentLayerPainter.
Comment 7 James Robinson 2012-06-18 15:47:41 PDT
D'oh, will move it up.
Comment 8 James Robinson 2012-06-18 15:55:20 PDT
Created attachment 148193 [details]
clear in CanvasLayerTextureUpdater
Comment 9 Adrienne Walker 2012-06-18 15:59:33 PDT
Comment on attachment 148193 [details]
clear in CanvasLayerTextureUpdater

R=me.
Comment 10 James Robinson 2012-06-18 16:16:24 PDT
Committed r120640: <http://trac.webkit.org/changeset/120640>