WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
76211
[chromium] Enable tracking opaque region in Skia graphics context, return it from LayerTextureUpdater
https://bugs.webkit.org/show_bug.cgi?id=76211
Summary
[chromium] Enable tracking opaque region in Skia graphics context, return it ...
Dana Jansens
Reported
2012-01-12 14:00:47 PST
[chromium] Enable tracking opaque region in Skia graphics context and save it in LayerTextureUpdater after paint.
Attachments
Patch
(12.63 KB, patch)
2012-01-12 14:10 PST
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Patch
(12.85 KB, patch)
2012-01-12 14:50 PST
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Patch
(27.10 KB, patch)
2012-01-14 07:07 PST
,
Dana Jansens
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Dana Jansens
Comment 1
2012-01-12 14:10:34 PST
Created
attachment 122308
[details]
Patch - Compute an opaque area in the Skia graphics context when the layer isn't known to be fully opaque already. - Save the opaque area given back by Skia's graphics context in the LayerTextureUpdater. - Pass on the opaque() flag equally to all LayerTextureUpdaters for possible optimizations.
Dana Jansens
Comment 2
2012-01-12 14:11:54 PST
(EWS is going to fail until CQ lands #74352.)
WebKit Review Bot
Comment 3
2012-01-12 14:35:21 PST
Comment on
attachment 122308
[details]
Patch
Attachment 122308
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/11152216
Dana Jansens
Comment 4
2012-01-12 14:50:12 PST
Created
attachment 122314
[details]
Patch rebased
James Robinson
Comment 5
2012-01-13 15:29:55 PST
Comment on
attachment 122314
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=122314&action=review
> Source/WebCore/platform/graphics/chromium/LayerTextureUpdater.h:81 > + // A subset of the layer determined to be opaque during update. Not valid when setOpaque() has been set true, > + // as the output is already known to be opaque in that case. > + const IntRect& opaqueRect() const { return m_opaqueRect; }
this is a little weird. the way this works seems to be that every given call to prepareToUpdate() could potentially update this rectangle to be a part of the passed in contentRect, but the opaqueRect isn't valid for any future call to prepareToUpdate(). since we could call prepareToUpdate() many times on an updater with different content rects it seems like this would be better implemented as an output parameter to prepareToUpdate(). what would you think of that?
> Source/WebKit/chromium/tests/SkPictureCanvasLayerTextureUpdaterTest.cpp:68 > + updater->prepareToUpdate(IntRect(0, 0, width, height), IntSize(width, height), 0, 1.0); \
just 1, not 1.0
> Source/WebKit/chromium/tests/SkPictureCanvasLayerTextureUpdaterTest.cpp:82 > + Color opaque(1.0f, 0.0f, 0.0f, 1.0f);
WK style is (1, 0, 0, 1) or just (1, 0, 0). same goes for the rest of this file
Dana Jansens
Comment 6
2012-01-14 07:04:48 PST
Comment on
attachment 122314
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=122314&action=review
>> Source/WebCore/platform/graphics/chromium/LayerTextureUpdater.h:81 >> + const IntRect& opaqueRect() const { return m_opaqueRect; } > > this is a little weird. the way this works seems to be that every given call to prepareToUpdate() could potentially update this rectangle to be a part of the passed in contentRect, but the opaqueRect isn't valid for any future call to prepareToUpdate(). since we could call prepareToUpdate() many times on an updater with different content rects it seems like this would be better implemented as an output parameter to prepareToUpdate(). what would you think of that?
yes absolutely. thanks. I added a rect to pass to prepareToUpdate() then, which is not used at all, as a local variable in prepareToUpdateTiles. Next CL will remove this as stated in the FIXME, just trying to keep CLs small.
>> Source/WebKit/chromium/tests/SkPictureCanvasLayerTextureUpdaterTest.cpp:68 >> + updater->prepareToUpdate(IntRect(0, 0, width, height), IntSize(width, height), 0, 1.0); \ > > just 1, not 1.0
done.
>> Source/WebKit/chromium/tests/SkPictureCanvasLayerTextureUpdaterTest.cpp:82 >> + Color opaque(1.0f, 0.0f, 0.0f, 1.0f); > > WK style is (1, 0, 0, 1) or just (1, 0, 0). same goes for the rest of this file
oops, i tried 1.0 but ints (255) obviously work here, thanks.
Dana Jansens
Comment 7
2012-01-14 07:07:02 PST
Created
attachment 122545
[details]
Patch comments addressed. - Since the opaqueRect is being returned from all texture updaters, I made BitmapCanvasLayerTextureUpdater compute the resultingOpaqueRect also.
Adrienne Walker
Comment 8
2012-01-17 11:49:49 PST
Comment on
attachment 122545
[details]
Patch This looks great to me. :)
James Robinson
Comment 9
2012-01-17 13:15:20 PST
Comment on
attachment 122545
[details]
Patch R=me
WebKit Review Bot
Comment 10
2012-01-18 13:42:08 PST
Comment on
attachment 122545
[details]
Patch Clearing flags on attachment: 122545 Committed
r105314
: <
http://trac.webkit.org/changeset/105314
>
WebKit Review Bot
Comment 11
2012-01-18 13:42:18 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug