RESOLVED FIXED 79708
[chromium] LayerChromium::contentChanged is redundant with setNeedsDisplay
https://bugs.webkit.org/show_bug.cgi?id=79708
Summary [chromium] LayerChromium::contentChanged is redundant with setNeedsDisplay
James Robinson
Reported 2012-02-27 15:21:29 PST
[chromium] LayerChromium::contentChanged is redundant with setNeedsDisplay
Attachments
Patch (6.89 KB, patch)
2012-02-27 15:25 PST, James Robinson
no flags
Patch (9.08 KB, patch)
2012-02-27 15:58 PST, James Robinson
no flags
Patch (9.09 KB, patch)
2012-02-27 17:00 PST, James Robinson
no flags
Patch (9.78 KB, patch)
2012-02-27 17:02 PST, James Robinson
no flags
Patch (12.18 KB, patch)
2012-02-28 11:10 PST, James Robinson
no flags
Patch (14.06 KB, patch)
2012-03-01 16:57 PST, James Robinson
enne: review+
James Robinson
Comment 1 2012-02-27 15:25:34 PST
Shawn Singh
Comment 2 2012-02-27 15:31:48 PST
Just wondering how this patch interacts with backer's quick-fix in https://bugs.webkit.org/show_bug.cgi?id=79373 ? Would we be able to remove contentChanged for video layers, too, and instead put the m_updateRect statement inside setNeedsDisplay?
James Robinson
Comment 3 2012-02-27 15:38:41 PST
Thanks, I missed that (why on earth does VideoLayerChromium.h not declare that function virtual?). Yes, I believe that the WebMediaPlayerClientImpl should call setNeedsDisplay() and that call should set the correct updateRect.
James Robinson
Comment 4 2012-02-27 15:58:04 PST
James Robinson
Comment 5 2012-02-27 16:00:02 PST
Shawn - does the updateRect logic have to be layer-specific, or would it be valid to set this in LayerChromium::setNeedsDisplayRect() ?
James Robinson
Comment 6 2012-02-27 16:30:44 PST
Comment on attachment 129119 [details] Patch Shawn had some good offline feedback. Will revise and post a new patch.
James Robinson
Comment 7 2012-02-27 17:00:40 PST
James Robinson
Comment 8 2012-02-27 17:02:54 PST
James Robinson
Comment 9 2012-02-27 17:04:41 PST
This moves m_updateRect updates to the base class LayerChromium::setNeedsDisplayRect since it's a more reasonable default behavior - layers can override this in updateCompositorResources (and TiledLayerChromium does), but having this be the default should prevent more bugs like https://bugs.webkit.org/show_bug.cgi?id=79373 from popping up in the future.
Shawn Singh
Comment 10 2012-02-27 17:10:39 PST
Yeah, this looks good to me. =)
Jonathan Backer
Comment 11 2012-02-28 08:39:25 PST
Thanks for the cleanup. I tested this patch with HTML5 video, accelerated canvas2D, and WebGL on Aura. A few comments: I think that you can ditch the change to m_updateRect in WebGLLayerChromium::updateCompositorResources I think that we can ditch the m_dirtyRect tracking introduced in https://bugs.webkit.org/show_bug.cgi?id=73485 for PluginLayerChromium.
James Robinson
Comment 12 2012-02-28 11:10:08 PST
James Robinson
Comment 13 2012-02-28 11:12:12 PST
(In reply to comment #11) > I think that you can ditch the change to m_updateRect in WebGLLayerChromium::updateCompositorResources > > I think that we can ditch the m_dirtyRect tracking introduced in https://bugs.webkit.org/show_bug.cgi?id=73485 for PluginLayerChromium. Cool, done. Thanks for testing.
Jonathan Backer
Comment 14 2012-02-28 14:30:13 PST
SGTM. I can test tomorrow morning if you'd like (exercising the plugin path is a bit of a pain).
Jonathan Backer
Comment 15 2012-03-01 08:19:34 PST
(In reply to comment #14) > SGTM. I can test tomorrow morning if you'd like (exercising the plugin path is a bit of a pain). All good from my perspective.
Adrienne Walker
Comment 16 2012-03-01 11:45:58 PST
Comment on attachment 129294 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=129294&action=review > Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp:105 > void PluginLayerChromium::invalidateRect(const FloatRect& dirtyRect) > { > setNeedsDisplayRect(dirtyRect); > - m_dirtyRect.unite(dirtyRect); > } While we're removing things, can you get rid of this function too and have WebPluginContainerImpl just call setNeedsDisplay directly?
James Robinson
Comment 17 2012-03-01 16:57:27 PST
James Robinson
Comment 18 2012-03-01 17:02:02 PST
(In reply to comment #16) > While we're removing things, can you get rid of this function too and have WebPluginContainerImpl just call setNeedsDisplay directly? Sure can, it's gone as well. Mind taking another look?
Adrienne Walker
Comment 19 2012-03-01 17:09:35 PST
Comment on attachment 129777 [details] Patch Looks good to me. Thanks!
James Robinson
Comment 20 2012-03-01 17:14:30 PST
Note You need to log in before you can comment on or make changes to this bug.