Summary: | [GTK][AC] Adding contentsLayer for image and video | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joone Hur <joone> | ||||||||
Component: | WebKitGTK | Assignee: | Joone Hur <joone> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, gustavo, kevin.cs.oh | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | 113758 | ||||||||||
Bug Blocks: | 105699, 114113 | ||||||||||
Attachments: |
|
Description
Joone Hur
2013-04-03 17:42:24 PDT
Created attachment 196551 [details]
Patch
I leave some notes as an informal review. Please just refer to those. :) > Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp:452 > + graphicsLayerActorInvalidateRectangle(m_contentsLayer.get(), FloatRect(FloatPoint(0, 0), size())); I believe we don't need to call this here. Because we set ContentsNeedsDisplay below so above lines will be called in updateContentsNeedsDisplay(). > Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp:701 > + updateContentsRect(); We would be better to follow macport's order for calling above lines to avoid conflicts that might occur in the future. > Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp:716 > + updateContentsNeedsDisplay(); ditto. (In reply to comment #2) > I leave some notes as an informal review. Please just refer to those. :) > > > Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp:452 > > + graphicsLayerActorInvalidateRectangle(m_contentsLayer.get(), FloatRect(FloatPoint(0, 0), size())); > > I believe we don't need to call this here. Because we set ContentsNeedsDisplay below so above lines will be called in updateContentsNeedsDisplay(). Yes, right. graphicsLayerActorInvalidateRectangle is called twice. I will fix it. > > Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp:701 > > + updateContentsRect(); > > We would be better to follow macport's order for calling above lines to avoid conflicts that might occur in the future. > > > Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp:716 > > + updateContentsNeedsDisplay(); > > ditto. Yes, it seems more safe to follow the Mac port's layer change order. Created attachment 196648 [details]
Patch
Comment on attachment 196648 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=196648&action=review > Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp:743 > +#ifndef NDEBUG > + clutter_actor_set_name(CLUTTER_ACTOR(m_contentsLayer.get()), "Image Layer"); > +#endif I think we should set the name regardless of debug mode, it's not like this adds any overhead, right? > Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.h:220 > + // FIXME: Need to use RetainPtr This FIXME makes no sense. Comment on attachment 196648 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=196648&action=review >> Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.cpp:743 >> +#endif > > I think we should set the name regardless of debug mode, it's not like this adds any overhead, right? But, ClutterActor name is only useful to print out a PlatformLayer tree for debugging. Is there any case where this is useful in release build? >> Source/WebCore/platform/graphics/clutter/GraphicsLayerClutter.h:220 >> + // FIXME: Need to use RetainPtr > > This FIXME makes no sense. Yes, RetainPtr is a specific smart pointer class of the Mac port. I will remove this comment. Created attachment 197186 [details]
Patch
Comment on attachment 197186 [details] Patch Clearing flags on attachment: 197186 Committed r148069: <http://trac.webkit.org/changeset/148069> All reviewed patches have been landed. Closing bug. (In reply to comment #6) > But, ClutterActor name is only useful to print out a PlatformLayer tree for debugging. > Is there any case where this is useful in release build? Yeah, it's useful for running with CLUTTER_PAINT=paint-volumes |