Changeset 105460 in webkit
- Timestamp:
- Jan 19, 2012 4:07:53 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r105457 r105460 1 2012-01-19 James Robinson <jamesr@chromium.org> 2 3 [chromium] Remove CCLayerDelegate, add ContentLayerDelegate for painting 4 https://bugs.webkit.org/show_bug.cgi?id=76663 5 6 Reviewed by Kenneth Russell. 7 8 CCLayerDelegate used to be an interface with a half-dozen callbacks on it, but now it has only one call - 9 paintContents() - and that one call is only valid for one subclass of LayerChromium, ContentLayerChromium. This 10 removes the CCLayerDelegate pointer from LayerChromium and adds a ContentLayerDelegate for the paint call. 11 12 The majority of the code changes in this patch are removing the nil parameter from various places that construct 13 LayerChromium instances. Also tightens the type of GraphicsLayerChromium::m_layer to ContentLayerChromium. 14 15 Refactoring/removing dead code, so no new tests. 16 17 * platform/graphics/chromium/Canvas2DLayerChromium.cpp: 18 (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): 19 * platform/graphics/chromium/CanvasLayerChromium.cpp: 20 (WebCore::CanvasLayerChromium::CanvasLayerChromium): 21 * platform/graphics/chromium/CanvasLayerChromium.h: 22 * platform/graphics/chromium/ContentLayerChromium.cpp: 23 (WebCore::ContentLayerPainter::create): 24 (WebCore::ContentLayerPainter::ContentLayerPainter): 25 (WebCore::ContentLayerChromium::create): 26 (WebCore::ContentLayerChromium::ContentLayerChromium): 27 * platform/graphics/chromium/ContentLayerChromium.h: 28 (WebCore::ContentLayerDelegate::~ContentLayerDelegate): 29 (WebCore::ContentLayerChromium::clearDelegate): 30 * platform/graphics/chromium/DrawingBufferChromium.cpp: 31 (WebCore::DrawingBuffer::platformLayer): 32 * platform/graphics/chromium/GraphicsLayerChromium.cpp: 33 (WebCore::GraphicsLayerChromium::~GraphicsLayerChromium): 34 (WebCore::GraphicsLayerChromium::setContentsToImage): 35 (WebCore::GraphicsLayerChromium::setContentsToCanvas): 36 (WebCore::GraphicsLayerChromium::setContentsToMedia): 37 (WebCore::GraphicsLayerChromium::updateLayerPreserves3D): 38 * platform/graphics/chromium/GraphicsLayerChromium.h: 39 * platform/graphics/chromium/ImageLayerChromium.cpp: 40 (WebCore::ImageLayerChromium::create): 41 (WebCore::ImageLayerChromium::ImageLayerChromium): 42 * platform/graphics/chromium/ImageLayerChromium.h: 43 * platform/graphics/chromium/LayerChromium.cpp: 44 (WebCore::LayerChromium::create): 45 (WebCore::LayerChromium::LayerChromium): 46 * platform/graphics/chromium/LayerChromium.h: 47 * platform/graphics/chromium/PluginLayerChromium.cpp: 48 (WebCore::PluginLayerChromium::create): 49 (WebCore::PluginLayerChromium::PluginLayerChromium): 50 * platform/graphics/chromium/PluginLayerChromium.h: 51 * platform/graphics/chromium/TiledLayerChromium.cpp: 52 (WebCore::TiledLayerChromium::TiledLayerChromium): 53 (WebCore::TiledLayerChromium::drawsContent): 54 * platform/graphics/chromium/TiledLayerChromium.h: 55 * platform/graphics/chromium/VideoLayerChromium.cpp: 56 (WebCore::VideoLayerChromium::create): 57 (WebCore::VideoLayerChromium::VideoLayerChromium): 58 * platform/graphics/chromium/VideoLayerChromium.h: 59 * platform/graphics/chromium/WebGLLayerChromium.cpp: 60 (WebCore::WebGLLayerChromium::create): 61 (WebCore::WebGLLayerChromium::WebGLLayerChromium): 62 * platform/graphics/chromium/WebGLLayerChromium.h: 63 1 64 2012-01-19 Greg Billock <gbillock@google.com> 2 65 -
trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp
r104044 r105460 54 54 55 55 Canvas2DLayerChromium::Canvas2DLayerChromium(GraphicsContext3D* context, const IntSize& size) 56 : CanvasLayerChromium( 0)56 : CanvasLayerChromium() 57 57 , m_context(context) 58 58 , m_size(size) -
trunk/Source/WebCore/platform/graphics/chromium/CanvasLayerChromium.cpp
r103264 r105460 41 41 namespace WebCore { 42 42 43 CanvasLayerChromium::CanvasLayerChromium( CCLayerDelegate* delegate)44 : LayerChromium( delegate)43 CanvasLayerChromium::CanvasLayerChromium() 44 : LayerChromium() 45 45 { 46 46 } -
trunk/Source/WebCore/platform/graphics/chromium/CanvasLayerChromium.h
r103264 r105460 45 45 46 46 protected: 47 explicit CanvasLayerChromium(CCLayerDelegate*);47 CanvasLayerChromium(); 48 48 }; 49 49 -
trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp
r105314 r105460 49 49 WTF_MAKE_NONCOPYABLE(ContentLayerPainter); 50 50 public: 51 static PassOwnPtr<ContentLayerPainter> create(C CLayerDelegate* delegate)51 static PassOwnPtr<ContentLayerPainter> create(ContentLayerDelegate* delegate) 52 52 { 53 53 return adoptPtr(new ContentLayerPainter(delegate)); … … 66 66 } 67 67 private: 68 explicit ContentLayerPainter(C CLayerDelegate* delegate)68 explicit ContentLayerPainter(ContentLayerDelegate* delegate) 69 69 : m_delegate(delegate) 70 70 { 71 71 } 72 72 73 C CLayerDelegate* m_delegate;73 ContentLayerDelegate* m_delegate; 74 74 }; 75 75 76 PassRefPtr<ContentLayerChromium> ContentLayerChromium::create(C CLayerDelegate* delegate)76 PassRefPtr<ContentLayerChromium> ContentLayerChromium::create(ContentLayerDelegate* delegate) 77 77 { 78 78 return adoptRef(new ContentLayerChromium(delegate)); 79 79 } 80 80 81 ContentLayerChromium::ContentLayerChromium(CCLayerDelegate* delegate) 82 : TiledLayerChromium(delegate) 81 ContentLayerChromium::ContentLayerChromium(ContentLayerDelegate* delegate) 82 : TiledLayerChromium() 83 , m_delegate(delegate) 83 84 { 84 85 } -
trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.h
r104742 r105460 43 43 class LayerTextureUpdater; 44 44 45 class ContentLayerDelegate { 46 public: 47 virtual ~ContentLayerDelegate() { } 48 virtual void paintContents(GraphicsContext&, const IntRect& clip) = 0; 49 }; 50 45 51 // A Layer that requires a GraphicsContext to render its contents. 46 52 class ContentLayerChromium : public TiledLayerChromium { 47 53 public: 48 static PassRefPtr<ContentLayerChromium> create(C CLayerDelegate*);54 static PassRefPtr<ContentLayerChromium> create(ContentLayerDelegate*); 49 55 50 56 virtual ~ContentLayerChromium(); 57 58 void clearDelegate() { m_delegate = 0; } 51 59 52 60 virtual void paintContentsIfDirty(); … … 56 64 57 65 protected: 58 explicit ContentLayerChromium(C CLayerDelegate*);66 explicit ContentLayerChromium(ContentLayerDelegate*); 59 67 60 68 private: … … 62 70 virtual LayerTextureUpdater* textureUpdater() const { return m_textureUpdater.get(); } 63 71 72 ContentLayerDelegate* m_delegate; 64 73 RefPtr<LayerTextureUpdater> m_textureUpdater; 65 74 }; -
trunk/Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp
r102098 r105460 144 144 { 145 145 if (!m_platformLayer) { 146 m_platformLayer = WebGLLayerChromium::create( 0);146 m_platformLayer = WebGLLayerChromium::create(); 147 147 m_platformLayer->setDrawingBuffer(this); 148 148 m_platformLayer->setOpaque(!m_context->getContextAttributes().alpha); -
trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp
r103990 r105460 83 83 { 84 84 if (m_layer) { 85 m_layer-> setDelegate(0);85 m_layer->clearDelegate(); 86 86 m_layer->clearRenderSurface(); 87 87 } 88 if (m_contentsLayer) { 89 m_contentsLayer->setDelegate(0); 88 if (m_contentsLayer) 90 89 m_contentsLayer->clearRenderSurface(); 91 } 92 if (m_transformLayer) { 93 m_transformLayer->setDelegate(0); 90 if (m_transformLayer) 94 91 m_transformLayer->clearRenderSurface(); 95 }96 92 } 97 93 … … 328 324 if (image) { 329 325 if (!m_contentsLayer.get() || m_contentsLayerPurpose != ContentsLayerForImage) { 330 RefPtr<ImageLayerChromium> imageLayer = ImageLayerChromium::create( this);326 RefPtr<ImageLayerChromium> imageLayer = ImageLayerChromium::create(); 331 327 setupContentsLayer(imageLayer.get()); 332 328 m_contentsLayerPurpose = ContentsLayerForImage; … … 354 350 bool childrenChanged = false; 355 351 if (platformLayer) { 356 platformLayer->setDelegate(this);357 352 if (m_contentsLayer.get() != platformLayer) { 358 353 setupContentsLayer(platformLayer); … … 384 379 childrenChanged = true; 385 380 } 386 layer->setDelegate(this);387 381 layer->setNeedsDisplay(); 388 382 updateContentsRect(); … … 529 523 if (m_preserves3D && !m_transformLayer) { 530 524 // Create the transform layer. 531 m_transformLayer = LayerChromium::create( this);525 m_transformLayer = LayerChromium::create(); 532 526 m_transformLayer->setPreserves3D(true); 533 527 -
trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.h
r103990 r105460 34 34 #if USE(ACCELERATED_COMPOSITING) 35 35 36 #include "ContentLayerChromium.h" 36 37 #include "LayerChromium.h" 37 38 #include "GraphicsContext.h" … … 42 43 class LayerChromium; 43 44 44 class GraphicsLayerChromium : public GraphicsLayer, public C CLayerDelegate {45 class GraphicsLayerChromium : public GraphicsLayer, public ContentLayerDelegate { 45 46 public: 46 47 GraphicsLayerChromium(GraphicsLayerClient*); … … 98 99 virtual void deviceOrPageScaleFactorChanged(); 99 100 100 // The following functions implement the CCLayerDelegate interface.101 // ContentLayerDelegate implementation. 101 102 virtual void paintContents(GraphicsContext&, const IntRect& clip); 102 103 … … 131 132 String m_nameBase; 132 133 133 RefPtr< LayerChromium> m_layer;134 RefPtr<ContentLayerChromium> m_layer; 134 135 RefPtr<LayerChromium> m_transformLayer; 135 136 RefPtr<LayerChromium> m_contentsLayer; -
trunk/Source/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
r105328 r105460 130 130 }; 131 131 132 PassRefPtr<ImageLayerChromium> ImageLayerChromium::create( CCLayerDelegate* delegate)133 { 134 return adoptRef(new ImageLayerChromium( delegate));135 } 136 137 ImageLayerChromium::ImageLayerChromium( CCLayerDelegate* delegate)138 : TiledLayerChromium( delegate)132 PassRefPtr<ImageLayerChromium> ImageLayerChromium::create() 133 { 134 return adoptRef(new ImageLayerChromium()); 135 } 136 137 ImageLayerChromium::ImageLayerChromium() 138 : TiledLayerChromium() 139 139 , m_imageForCurrentFrame(0) 140 140 { -
trunk/Source/WebCore/platform/graphics/chromium/ImageLayerChromium.h
r104003 r105460 50 50 class ImageLayerChromium : public TiledLayerChromium { 51 51 public: 52 static PassRefPtr<ImageLayerChromium> create( CCLayerDelegate*);52 static PassRefPtr<ImageLayerChromium> create(); 53 53 virtual ~ImageLayerChromium(); 54 54 … … 60 60 61 61 private: 62 explicit ImageLayerChromium(CCLayerDelegate*);62 ImageLayerChromium(); 63 63 64 64 virtual void createTextureUpdater(const CCLayerTreeHost*); -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp
r103990 r105460 50 50 static int s_nextLayerId = 1; 51 51 52 PassRefPtr<LayerChromium> LayerChromium::create(CCLayerDelegate* delegate) 53 { 54 return adoptRef(new LayerChromium(delegate)); 55 } 56 57 LayerChromium::LayerChromium(CCLayerDelegate* delegate) 58 : m_delegate(delegate) 59 , m_needsDisplay(false) 52 PassRefPtr<LayerChromium> LayerChromium::create() 53 { 54 return adoptRef(new LayerChromium()); 55 } 56 57 LayerChromium::LayerChromium() 58 : m_needsDisplay(false) 60 59 , m_layerId(s_nextLayerId++) 61 60 , m_parent(0) -
trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h
r104742 r105460 57 57 class GraphicsContext3D; 58 58 59 class CCLayerDelegate {60 public:61 virtual ~CCLayerDelegate() { }62 virtual void paintContents(GraphicsContext&, const IntRect& clip) = 0;63 };64 65 59 // Base class for composited layers. Special layer types are derived from 66 60 // this class. … … 68 62 friend class LayerTilerChromium; 69 63 public: 70 static PassRefPtr<LayerChromium> create( CCLayerDelegate*);64 static PassRefPtr<LayerChromium> create(); 71 65 72 66 virtual ~LayerChromium(); … … 149 143 150 144 virtual void setLayerTreeHost(CCLayerTreeHost*); 151 152 void setDelegate(CCLayerDelegate* delegate) { m_delegate = delegate; }153 145 154 146 void setIsDrawable(bool); … … 205 197 206 198 protected: 207 CCLayerDelegate* m_delegate; 208 explicit LayerChromium(CCLayerDelegate*); 199 LayerChromium(); 209 200 210 201 // This is called to clean up resources being held in the same context as -
trunk/Source/WebCore/platform/graphics/chromium/PluginLayerChromium.cpp
r102250 r105460 37 37 namespace WebCore { 38 38 39 PassRefPtr<PluginLayerChromium> PluginLayerChromium::create( CCLayerDelegate* delegate)39 PassRefPtr<PluginLayerChromium> PluginLayerChromium::create() 40 40 { 41 return adoptRef(new PluginLayerChromium (delegate));41 return adoptRef(new PluginLayerChromium); 42 42 } 43 43 44 PluginLayerChromium::PluginLayerChromium( CCLayerDelegate* delegate)45 : LayerChromium( delegate)44 PluginLayerChromium::PluginLayerChromium() 45 : LayerChromium() 46 46 , m_textureId(0) 47 47 , m_flipped(true) -
trunk/Source/WebCore/platform/graphics/chromium/PluginLayerChromium.h
r103990 r105460 37 37 class PluginLayerChromium : public LayerChromium { 38 38 public: 39 static PassRefPtr<PluginLayerChromium> create( CCLayerDelegate* = 0);39 static PassRefPtr<PluginLayerChromium> create(); 40 40 virtual void updateCompositorResources(GraphicsContext3D*, CCTextureUpdater&); 41 41 … … 59 59 60 60 protected: 61 explicit PluginLayerChromium(CCLayerDelegate*);61 PluginLayerChromium(); 62 62 63 63 private: -
trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp
r105371 r105460 72 72 }; 73 73 74 TiledLayerChromium::TiledLayerChromium( CCLayerDelegate* delegate)75 : LayerChromium( delegate)74 TiledLayerChromium::TiledLayerChromium() 75 : LayerChromium() 76 76 , m_textureFormat(GraphicsContext3D::INVALID_ENUM) 77 77 , m_skipsDraw(false) … … 155 155 bool TiledLayerChromium::drawsContent() const 156 156 { 157 if (!LayerChromium::drawsContent() || !m_delegate)157 if (!LayerChromium::drawsContent()) 158 158 return false; 159 159 -
trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.h
r103972 r105460 63 63 64 64 protected: 65 explicit TiledLayerChromium(CCLayerDelegate*);65 TiledLayerChromium(); 66 66 67 67 virtual void cleanupResources(); -
trunk/Source/WebCore/platform/graphics/chromium/VideoLayerChromium.cpp
r103370 r105460 37 37 namespace WebCore { 38 38 39 PassRefPtr<VideoLayerChromium> VideoLayerChromium::create(CCLayerDelegate* delegate, 40 VideoFrameProvider* provider) 39 PassRefPtr<VideoLayerChromium> VideoLayerChromium::create(VideoFrameProvider* provider) 41 40 { 42 return adoptRef(new VideoLayerChromium( delegate,provider));41 return adoptRef(new VideoLayerChromium(provider)); 43 42 } 44 43 45 VideoLayerChromium::VideoLayerChromium( CCLayerDelegate* delegate,VideoFrameProvider* provider)46 : LayerChromium( delegate)44 VideoLayerChromium::VideoLayerChromium(VideoFrameProvider* provider) 45 : LayerChromium() 47 46 , m_provider(provider) 48 47 { -
trunk/Source/WebCore/platform/graphics/chromium/VideoLayerChromium.h
r103990 r105460 46 46 public: 47 47 48 static PassRefPtr<VideoLayerChromium> create(CCLayerDelegate* = 0, 49 VideoFrameProvider* = 0); 48 static PassRefPtr<VideoLayerChromium> create(VideoFrameProvider* = 0); 50 49 virtual ~VideoLayerChromium(); 51 50 … … 53 52 54 53 private: 55 VideoLayerChromium(CCLayerDelegate*,VideoFrameProvider*);54 explicit VideoLayerChromium(VideoFrameProvider*); 56 55 57 56 // This pointer is only for passing to CCVideoLayerImpl's constructor. It should never be dereferenced by this class. -
trunk/Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.cpp
r103990 r105460 43 43 namespace WebCore { 44 44 45 PassRefPtr<WebGLLayerChromium> WebGLLayerChromium::create( CCLayerDelegate* delegate)45 PassRefPtr<WebGLLayerChromium> WebGLLayerChromium::create() 46 46 { 47 return adoptRef(new WebGLLayerChromium( delegate));47 return adoptRef(new WebGLLayerChromium()); 48 48 } 49 49 50 WebGLLayerChromium::WebGLLayerChromium( CCLayerDelegate* delegate)51 : CanvasLayerChromium( delegate)50 WebGLLayerChromium::WebGLLayerChromium() 51 : CanvasLayerChromium() 52 52 , m_hasAlpha(true) 53 53 , m_premultipliedAlpha(true) -
trunk/Source/WebCore/platform/graphics/chromium/WebGLLayerChromium.h
r103264 r105460 46 46 class WebGLLayerChromium : public CanvasLayerChromium { 47 47 public: 48 static PassRefPtr<WebGLLayerChromium> create( CCLayerDelegate* = 0);48 static PassRefPtr<WebGLLayerChromium> create(); 49 49 50 50 virtual ~WebGLLayerChromium(); … … 64 64 DrawingBuffer* drawingBuffer() const { return m_drawingBuffer; } 65 65 private: 66 explicit WebGLLayerChromium(CCLayerDelegate*);66 WebGLLayerChromium(); 67 67 friend class WebGLLayerChromiumRateLimitTask; 68 68 -
trunk/Source/WebKit/chromium/ChangeLog
r105449 r105460 1 2012-01-19 James Robinson <jamesr@chromium.org> 2 3 [chromium] Remove CCLayerDelegate, add ContentLayerDelegate for painting 4 https://bugs.webkit.org/show_bug.cgi?id=76663 5 6 Reviewed by Kenneth Russell. 7 8 * src/WebContentLayerImpl.cpp: 9 (WebKit::WebContentLayerImpl::~WebContentLayerImpl): 10 * src/WebContentLayerImpl.h: 11 * src/WebExternalTextureLayerImpl.cpp: 12 (WebKit::WebExternalTextureLayerImpl::WebExternalTextureLayerImpl): 13 (WebKit::WebExternalTextureLayerImpl::~WebExternalTextureLayerImpl): 14 * src/WebExternalTextureLayerImpl.h: 15 * src/WebLayerImpl.cpp: 16 (WebKit::WebLayerImpl::WebLayerImpl): 17 (WebKit::WebLayerImpl::~WebLayerImpl): 18 * src/WebLayerImpl.h: 19 * src/WebMediaPlayerClientImpl.cpp: 20 (WebKit::WebMediaPlayerClientImpl::readyStateChanged): 21 * src/WebPluginContainerImpl.cpp: 22 (WebKit::WebPluginContainerImpl::WebPluginContainerImpl): 23 * tests/CCLayerIteratorTest.cpp: 24 * tests/CCLayerTreeHostCommonTest.cpp: 25 (WebCore::LayerChromiumWithForcedDrawsContent::LayerChromiumWithForcedDrawsContent): 26 (WebCore::TEST): 27 * tests/CCLayerTreeHostTest.cpp: 28 (WTF::CCLayerTreeHostTest::doBeginTest): 29 (WTF::ContentLayerChromiumWithUpdateTracking::create): 30 (WTF::ContentLayerChromiumWithUpdateTracking::ContentLayerChromiumWithUpdateTracking): 31 * tests/LayerChromiumTest.cpp: 32 * tests/TiledLayerChromiumTest.cpp: 33 (WTF::FakeTiledLayerChromium::FakeTiledLayerChromium): 34 * tests/TreeSynchronizerTest.cpp: 35 (WebCore::MockLayerChromium::MockLayerChromium): 36 (WebCore::TEST): 37 1 38 2012-01-19 Dirk Pranke <dpranke@chromium.org> 2 39 -
trunk/Source/WebKit/chromium/src/WebContentLayerImpl.cpp
r103990 r105460 53 53 WebContentLayerImpl::~WebContentLayerImpl() 54 54 { 55 setDelegate(0);55 clearDelegate(); 56 56 } 57 57 -
trunk/Source/WebKit/chromium/src/WebContentLayerImpl.h
r103990 r105460 33 33 class WebContentLayerClient; 34 34 35 class WebContentLayerImpl : public WebCore::ContentLayerChromium, public WebCore::C CLayerDelegate {35 class WebContentLayerImpl : public WebCore::ContentLayerChromium, public WebCore::ContentLayerDelegate { 36 36 public: 37 37 static PassRefPtr<WebContentLayerImpl> create(WebContentLayerClient* contentClient); … … 42 42 explicit WebContentLayerImpl(WebContentLayerClient* contentClient); 43 43 virtual ~WebContentLayerImpl(); 44 45 // ContentLayerDelegate implementation. 44 46 virtual void paintContents(WebCore::GraphicsContext&, const WebCore::IntRect& clip); 45 47 -
trunk/Source/WebKit/chromium/src/WebExternalTextureLayerImpl.cpp
r104209 r105460 40 40 41 41 WebExternalTextureLayerImpl::WebExternalTextureLayerImpl() 42 : PluginLayerChromium( this)42 : PluginLayerChromium() 43 43 { 44 44 setFlipped(false); … … 48 48 WebExternalTextureLayerImpl::~WebExternalTextureLayerImpl() 49 49 { 50 setDelegate(0);51 50 } 52 51 … … 56 55 } 57 56 58 void WebExternalTextureLayerImpl::paintContents(GraphicsContext&, const IntRect&)59 {60 }61 62 57 } // namespace WebKit -
trunk/Source/WebKit/chromium/src/WebExternalTextureLayerImpl.h
r103293 r105460 32 32 namespace WebKit { 33 33 34 class WebExternalTextureLayerImpl : public WebCore::PluginLayerChromium , public WebCore::CCLayerDelegate{34 class WebExternalTextureLayerImpl : public WebCore::PluginLayerChromium { 35 35 public: 36 36 static PassRefPtr<WebExternalTextureLayerImpl> create(); … … 39 39 WebExternalTextureLayerImpl(); 40 40 virtual ~WebExternalTextureLayerImpl(); 41 virtual void paintContents(WebCore::GraphicsContext&, const WebCore::IntRect& clip);42 41 virtual bool drawsContent() const; 43 42 }; -
trunk/Source/WebKit/chromium/src/WebLayerImpl.cpp
r103990 r105460 37 37 38 38 WebLayerImpl::WebLayerImpl() 39 : LayerChromium( this)39 : LayerChromium() 40 40 { 41 41 // Make sure that this layer does not draw content. This way we don't have to override … … 46 46 WebLayerImpl::~WebLayerImpl() 47 47 { 48 setDelegate(0);49 48 } 50 49 -
trunk/Source/WebKit/chromium/src/WebLayerImpl.h
r103990 r105460 32 32 namespace WebKit { 33 33 34 class WebLayerImpl : public WebCore::LayerChromium , public WebCore::CCLayerDelegate{34 class WebLayerImpl : public WebCore::LayerChromium { 35 35 public: 36 36 static PassRefPtr<WebLayerImpl> create(); -
trunk/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
r105431 r105460 121 121 #if USE(ACCELERATED_COMPOSITING) 122 122 if (hasVideo() && supportsAcceleratedRendering() && !m_videoLayer) { 123 m_videoLayer = VideoLayerChromium::create( 0,this);123 m_videoLayer = VideoLayerChromium::create(this); 124 124 m_videoLayer->setOpaque(m_opaque); 125 125 } -
trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
r103147 r105460 538 538 , m_webPlugin(webPlugin) 539 539 #if USE(ACCELERATED_COMPOSITING) 540 , m_platformLayer(PluginLayerChromium::create( 0))540 , m_platformLayer(PluginLayerChromium::create()) 541 541 #endif 542 542 { -
trunk/Source/WebKit/chromium/tests/CCLayerIteratorTest.cpp
r104626 r105460 53 53 private: 54 54 TestLayerChromium() 55 : LayerChromium( 0)55 : LayerChromium() 56 56 , m_drawsContent(true) 57 57 { -
trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp
r102611 r105460 72 72 class LayerChromiumWithForcedDrawsContent : public LayerChromium { 73 73 public: 74 explicit LayerChromiumWithForcedDrawsContent(CCLayerDelegate* delegate)75 : LayerChromium( delegate)74 LayerChromiumWithForcedDrawsContent() 75 : LayerChromium() 76 76 { 77 77 } … … 87 87 // layers should also be identity transforms. 88 88 89 RefPtr<LayerChromium> parent = LayerChromium::create( 0);90 RefPtr<LayerChromium> child = LayerChromium::create( 0);91 RefPtr<LayerChromium> grandChild = LayerChromium::create( 0);89 RefPtr<LayerChromium> parent = LayerChromium::create(); 90 RefPtr<LayerChromium> child = LayerChromium::create(); 91 RefPtr<LayerChromium> grandChild = LayerChromium::create(); 92 92 parent->createRenderSurface(); 93 93 parent->addChild(child); … … 117 117 118 118 TransformationMatrix identityMatrix; 119 RefPtr<LayerChromium> layer = LayerChromium::create( 0);119 RefPtr<LayerChromium> layer = LayerChromium::create(); 120 120 layer->createRenderSurface(); 121 121 … … 182 182 { 183 183 TransformationMatrix identityMatrix; 184 RefPtr<LayerChromium> parent = LayerChromium::create( 0);185 RefPtr<LayerChromium> child = LayerChromium::create( 0);186 RefPtr<LayerChromium> grandChild = LayerChromium::create( 0);184 RefPtr<LayerChromium> parent = LayerChromium::create(); 185 RefPtr<LayerChromium> child = LayerChromium::create(); 186 RefPtr<LayerChromium> grandChild = LayerChromium::create(); 187 187 parent->createRenderSurface(); 188 188 parent->addChild(child); … … 264 264 TEST(CCLayerTreeHostCommonTest, verifyTransformsForSingleRenderSurface) 265 265 { 266 RefPtr<LayerChromium> parent = LayerChromium::create( 0);267 RefPtr<LayerChromium> child = LayerChromium::create( 0);268 RefPtr<LayerChromiumWithForcedDrawsContent> grandChild = adoptRef(new LayerChromiumWithForcedDrawsContent( 0));266 RefPtr<LayerChromium> parent = LayerChromium::create(); 267 RefPtr<LayerChromium> child = LayerChromium::create(); 268 RefPtr<LayerChromiumWithForcedDrawsContent> grandChild = adoptRef(new LayerChromiumWithForcedDrawsContent()); 269 269 parent->createRenderSurface(); 270 270 parent->addChild(child); … … 319 319 // - verifying that each layer has a reference to the correct renderSurface and targetRenderSurface values. 320 320 321 RefPtr<LayerChromium> parent = LayerChromium::create( 0);322 RefPtr<LayerChromium> renderSurface1 = LayerChromium::create( 0);323 RefPtr<LayerChromium> renderSurface2 = LayerChromium::create( 0);324 RefPtr<LayerChromium> childOfRoot = LayerChromium::create( 0);325 RefPtr<LayerChromium> childOfRS1 = LayerChromium::create( 0);326 RefPtr<LayerChromium> childOfRS2 = LayerChromium::create( 0);327 RefPtr<LayerChromium> grandChildOfRoot = LayerChromium::create( 0);328 RefPtr<LayerChromiumWithForcedDrawsContent> grandChildOfRS1 = adoptRef(new LayerChromiumWithForcedDrawsContent( 0));329 RefPtr<LayerChromiumWithForcedDrawsContent> grandChildOfRS2 = adoptRef(new LayerChromiumWithForcedDrawsContent( 0));321 RefPtr<LayerChromium> parent = LayerChromium::create(); 322 RefPtr<LayerChromium> renderSurface1 = LayerChromium::create(); 323 RefPtr<LayerChromium> renderSurface2 = LayerChromium::create(); 324 RefPtr<LayerChromium> childOfRoot = LayerChromium::create(); 325 RefPtr<LayerChromium> childOfRS1 = LayerChromium::create(); 326 RefPtr<LayerChromium> childOfRS2 = LayerChromium::create(); 327 RefPtr<LayerChromium> grandChildOfRoot = LayerChromium::create(); 328 RefPtr<LayerChromiumWithForcedDrawsContent> grandChildOfRS1 = adoptRef(new LayerChromiumWithForcedDrawsContent()); 329 RefPtr<LayerChromiumWithForcedDrawsContent> grandChildOfRS2 = adoptRef(new LayerChromiumWithForcedDrawsContent()); 330 330 parent->createRenderSurface(); 331 331 parent->addChild(renderSurface1); … … 455 455 TEST(CCLayerTreeHostCommonTest, verifyRenderSurfaceListForClipLayer) 456 456 { 457 RefPtr<LayerChromium> parent = LayerChromium::create( 0);458 RefPtr<LayerChromium> renderSurface1 = LayerChromium::create( 0);459 RefPtr<LayerChromiumWithForcedDrawsContent> child = adoptRef(new LayerChromiumWithForcedDrawsContent( 0));457 RefPtr<LayerChromium> parent = LayerChromium::create(); 458 RefPtr<LayerChromium> renderSurface1 = LayerChromium::create(); 459 RefPtr<LayerChromiumWithForcedDrawsContent> child = adoptRef(new LayerChromiumWithForcedDrawsContent()); 460 460 renderSurface1->setOpacity(0.9); 461 461 … … 484 484 TEST(CCLayerTreeHostCommonTest, verifyRenderSurfaceListForTransparentChild) 485 485 { 486 RefPtr<LayerChromium> parent = LayerChromium::create( 0);487 RefPtr<LayerChromium> renderSurface1 = LayerChromium::create( 0);488 RefPtr<LayerChromiumWithForcedDrawsContent> child = adoptRef(new LayerChromiumWithForcedDrawsContent( 0));486 RefPtr<LayerChromium> parent = LayerChromium::create(); 487 RefPtr<LayerChromium> renderSurface1 = LayerChromium::create(); 488 RefPtr<LayerChromiumWithForcedDrawsContent> child = adoptRef(new LayerChromiumWithForcedDrawsContent()); 489 489 renderSurface1->setOpacity(0); 490 490 … … 527 527 528 528 const TransformationMatrix identityMatrix; 529 RefPtr<LayerChromium> parent = LayerChromium::create( 0);530 RefPtr<LayerChromium> child = LayerChromium::create( 0);531 RefPtr<LayerChromium> grandChild = LayerChromium::create( 0);532 RefPtr<LayerChromium> greatGrandChild = LayerChromium::create( 0);533 RefPtr<LayerChromiumWithForcedDrawsContent> leafNode1 = adoptRef(new LayerChromiumWithForcedDrawsContent( 0));534 RefPtr<LayerChromiumWithForcedDrawsContent> leafNode2 = adoptRef(new LayerChromiumWithForcedDrawsContent( 0));529 RefPtr<LayerChromium> parent = LayerChromium::create(); 530 RefPtr<LayerChromium> child = LayerChromium::create(); 531 RefPtr<LayerChromium> grandChild = LayerChromium::create(); 532 RefPtr<LayerChromium> greatGrandChild = LayerChromium::create(); 533 RefPtr<LayerChromiumWithForcedDrawsContent> leafNode1 = adoptRef(new LayerChromiumWithForcedDrawsContent()); 534 RefPtr<LayerChromiumWithForcedDrawsContent> leafNode2 = adoptRef(new LayerChromiumWithForcedDrawsContent()); 535 535 parent->createRenderSurface(); 536 536 parent->addChild(child); -
trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
r104474 r105460 396 396 m_client = MockLayerTreeHostClient::create(this); 397 397 398 RefPtr<LayerChromium> rootLayer = LayerChromium::create( 0);398 RefPtr<LayerChromium> rootLayer = LayerChromium::create(); 399 399 m_layerTreeHost = MockLayerTreeHost::create(this, m_client.get(), rootLayer, m_settings); 400 400 ASSERT_TRUE(m_layerTreeHost); … … 913 913 } 914 914 915 class TestOpacityChangeLayerDelegate : public C CLayerDelegate {915 class TestOpacityChangeLayerDelegate : public ContentLayerDelegate { 916 916 public: 917 917 TestOpacityChangeLayerDelegate(CCLayerTreeHostTest* test) … … 934 934 class ContentLayerChromiumWithUpdateTracking : public ContentLayerChromium { 935 935 public: 936 static PassRefPtr<ContentLayerChromiumWithUpdateTracking> create(C CLayerDelegate *delegate) { return adoptRef(new ContentLayerChromiumWithUpdateTracking(delegate)); }936 static PassRefPtr<ContentLayerChromiumWithUpdateTracking> create(ContentLayerDelegate *delegate) { return adoptRef(new ContentLayerChromiumWithUpdateTracking(delegate)); } 937 937 938 938 int paintContentsCount() { return m_paintContentsCount; } … … 962 962 963 963 private: 964 explicit ContentLayerChromiumWithUpdateTracking(C CLayerDelegate *delegate)964 explicit ContentLayerChromiumWithUpdateTracking(ContentLayerDelegate* delegate) 965 965 : ContentLayerChromium(delegate) 966 966 , m_paintContentsCount(0) -
trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp
r104248 r105460 136 136 void createSimpleTestTree() 137 137 { 138 m_parent = LayerChromium::create( 0);139 m_child1 = LayerChromium::create( 0);140 m_child2 = LayerChromium::create( 0);141 m_child3 = LayerChromium::create( 0);142 m_grandChild1 = LayerChromium::create( 0);143 m_grandChild2 = LayerChromium::create( 0);144 m_grandChild3 = LayerChromium::create( 0);138 m_parent = LayerChromium::create(); 139 m_child1 = LayerChromium::create(); 140 m_child2 = LayerChromium::create(); 141 m_child3 = LayerChromium::create(); 142 m_grandChild1 = LayerChromium::create(); 143 m_grandChild2 = LayerChromium::create(); 144 m_grandChild3 = LayerChromium::create(); 145 145 146 146 EXPECT_CALL(*m_layerTreeHost, setNeedsCommit()).Times(AnyNumber()); … … 165 165 TEST_F(LayerChromiumTest, basicCreateAndDestroy) 166 166 { 167 RefPtr<LayerChromium> testLayer = LayerChromium::create( 0);167 RefPtr<LayerChromium> testLayer = LayerChromium::create(); 168 168 ASSERT_TRUE(testLayer); 169 169 … … 174 174 TEST_F(LayerChromiumTest, addAndRemoveChild) 175 175 { 176 RefPtr<LayerChromium> parent = LayerChromium::create( 0);177 RefPtr<LayerChromium> child = LayerChromium::create( 0);176 RefPtr<LayerChromium> parent = LayerChromium::create(); 177 RefPtr<LayerChromium> child = LayerChromium::create(); 178 178 179 179 // Upon creation, layers should not have children or parent. … … 195 195 TEST_F(LayerChromiumTest, insertChild) 196 196 { 197 RefPtr<LayerChromium> parent = LayerChromium::create( 0);198 RefPtr<LayerChromium> child1 = LayerChromium::create( 0);199 RefPtr<LayerChromium> child2 = LayerChromium::create( 0);200 RefPtr<LayerChromium> child3 = LayerChromium::create( 0);201 RefPtr<LayerChromium> child4 = LayerChromium::create( 0);197 RefPtr<LayerChromium> parent = LayerChromium::create(); 198 RefPtr<LayerChromium> child1 = LayerChromium::create(); 199 RefPtr<LayerChromium> child2 = LayerChromium::create(); 200 RefPtr<LayerChromium> child3 = LayerChromium::create(); 201 RefPtr<LayerChromium> child4 = LayerChromium::create(); 202 202 203 203 parent->setLayerTreeHost(m_layerTreeHost.get()); … … 241 241 TEST_F(LayerChromiumTest, insertChildPastEndOfList) 242 242 { 243 RefPtr<LayerChromium> parent = LayerChromium::create( 0);244 RefPtr<LayerChromium> child1 = LayerChromium::create( 0);245 RefPtr<LayerChromium> child2 = LayerChromium::create( 0);243 RefPtr<LayerChromium> parent = LayerChromium::create(); 244 RefPtr<LayerChromium> child1 = LayerChromium::create(); 245 RefPtr<LayerChromium> child2 = LayerChromium::create(); 246 246 247 247 ASSERT_EQ(static_cast<size_t>(0), parent->children().size()); … … 263 263 TEST_F(LayerChromiumTest, insertSameChildTwice) 264 264 { 265 RefPtr<LayerChromium> parent = LayerChromium::create( 0);266 RefPtr<LayerChromium> child1 = LayerChromium::create( 0);267 RefPtr<LayerChromium> child2 = LayerChromium::create( 0);265 RefPtr<LayerChromium> parent = LayerChromium::create(); 266 RefPtr<LayerChromium> child1 = LayerChromium::create(); 267 RefPtr<LayerChromium> child2 = LayerChromium::create(); 268 268 269 269 parent->setLayerTreeHost(m_layerTreeHost.get()); … … 292 292 { 293 293 createSimpleTestTree(); 294 RefPtr<LayerChromium> child4 = LayerChromium::create( 0);294 RefPtr<LayerChromium> child4 = LayerChromium::create(); 295 295 296 296 EXPECT_FALSE(child4->parent()); … … 312 312 313 313 // create another simple tree with testLayer and child4. 314 RefPtr<LayerChromium> testLayer = LayerChromium::create( 0);315 RefPtr<LayerChromium> child4 = LayerChromium::create( 0);314 RefPtr<LayerChromium> testLayer = LayerChromium::create(); 315 RefPtr<LayerChromium> child4 = LayerChromium::create(); 316 316 testLayer->addChild(child4); 317 317 ASSERT_EQ(static_cast<size_t>(1), testLayer->children().size()); … … 357 357 TEST_F(LayerChromiumTest, setChildren) 358 358 { 359 RefPtr<LayerChromium> oldParent = LayerChromium::create( 0);360 RefPtr<LayerChromium> newParent = LayerChromium::create( 0);361 362 RefPtr<LayerChromium> child1 = LayerChromium::create( 0);363 RefPtr<LayerChromium> child2 = LayerChromium::create( 0);359 RefPtr<LayerChromium> oldParent = LayerChromium::create(); 360 RefPtr<LayerChromium> newParent = LayerChromium::create(); 361 362 RefPtr<LayerChromium> child1 = LayerChromium::create(); 363 RefPtr<LayerChromium> child2 = LayerChromium::create(); 364 364 365 365 Vector<RefPtr<LayerChromium> > newChildren; … … 391 391 EXPECT_CALL(*m_layerTreeHost, setNeedsCommit()).Times(AtLeast(1)); 392 392 393 RefPtr<LayerChromium> child4 = LayerChromium::create( 0);393 RefPtr<LayerChromium> child4 = LayerChromium::create(); 394 394 395 395 EXPECT_EQ(m_parent.get(), m_parent->rootLayer()); … … 444 444 // 2. indirectly calls setNeedsCommit, exactly once for each call to setNeedsDisplay. 445 445 446 RefPtr<LayerChromium> testLayer = LayerChromium::create( 0);446 RefPtr<LayerChromium> testLayer = LayerChromium::create(); 447 447 testLayer->setLayerTreeHost(m_layerTreeHost.get()); 448 448 … … 459 459 // This is just initialization, but setNeedsCommit behavior is verified anyway to avoid warnings. 460 460 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setBounds(testBounds)); 461 testLayer = LayerChromium::create( 0);461 testLayer = LayerChromium::create(); 462 462 testLayer->setLayerTreeHost(m_layerTreeHost.get()); 463 463 EXPECT_FALSE(testLayer->needsDisplay()); … … 478 478 479 479 // Case 4: LayerChromium should accept dirty rects that go beyond its bounds. 480 testLayer = LayerChromium::create( 0);480 testLayer = LayerChromium::create(); 481 481 testLayer->setLayerTreeHost(m_layerTreeHost.get()); 482 482 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setBounds(testBounds)); … … 485 485 486 486 // Case 5: setNeedsDisplay() without the dirty rect arg. 487 testLayer = LayerChromium::create( 0);487 testLayer = LayerChromium::create(); 488 488 testLayer->setLayerTreeHost(m_layerTreeHost.get()); 489 489 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setBounds(testBounds)); … … 492 492 } 493 493 494 TEST_F(LayerChromiumTest, checkSetNeedsDisplayWithNullDelegate)495 {496 RefPtr<LayerChromium> testLayer = LayerChromium::create(0);497 IntSize testBounds = IntSize(501, 508);498 499 FloatRect dirty = FloatRect(10.0f, 15.0f, 1.0f, 2.0f);500 501 testLayer->setBounds(testBounds);502 EXPECT_TRUE(testLayer->needsDisplay());503 504 testLayer = LayerChromium::create(0);505 EXPECT_FALSE(testLayer->needsDisplay());506 507 testLayer->setNeedsDisplayRect(dirty);508 EXPECT_TRUE(testLayer->needsDisplay());509 }510 511 494 TEST_F(LayerChromiumTest, checkPropertyChangeCausesCorrectBehavior) 512 495 { 513 RefPtr<LayerChromium> testLayer = LayerChromium::create( 0);496 RefPtr<LayerChromium> testLayer = LayerChromium::create(); 514 497 testLayer->setLayerTreeHost(m_layerTreeHost.get()); 515 498 516 RefPtr<LayerChromium> dummyLayer = LayerChromium::create( 0); // just a dummy layer for this test case.499 RefPtr<LayerChromium> dummyLayer = LayerChromium::create(); // just a dummy layer for this test case. 517 500 518 501 // sanity check of initial test condition … … 559 542 class LayerChromiumWithContentScaling : public LayerChromium { 560 543 public: 561 explicit LayerChromiumWithContentScaling( CCLayerDelegate* delegate)562 : LayerChromium( delegate)544 explicit LayerChromiumWithContentScaling() 545 : LayerChromium() 563 546 { 564 547 } … … 577 560 TEST_F(LayerChromiumTest, checkContentsScaleChangeTriggersNeedsDisplay) 578 561 { 579 RefPtr<LayerChromiumWithContentScaling> testLayer = adoptRef(new LayerChromiumWithContentScaling( 0));562 RefPtr<LayerChromiumWithContentScaling> testLayer = adoptRef(new LayerChromiumWithContentScaling()); 580 563 testLayer->setLayerTreeHost(m_layerTreeHost.get()); 581 564 … … 627 610 { 628 611 WebKit::WebCompositor::initialize(0); 629 RefPtr<LayerChromium> parent = LayerChromium::create( 0);630 RefPtr<LayerChromium> child = LayerChromium::create( 0);631 RefPtr<LayerChromium> mask = LayerChromium::create( 0);632 RefPtr<LayerChromium> replica = LayerChromium::create( 0);633 RefPtr<LayerChromium> replicaMask = LayerChromium::create( 0);612 RefPtr<LayerChromium> parent = LayerChromium::create(); 613 RefPtr<LayerChromium> child = LayerChromium::create(); 614 RefPtr<LayerChromium> mask = LayerChromium::create(); 615 RefPtr<LayerChromium> replica = LayerChromium::create(); 616 RefPtr<LayerChromium> replicaMask = LayerChromium::create(); 634 617 635 618 // Set up a detached tree of layers. The host pointer should be nil for these layers. … … 659 642 { 660 643 WebKit::WebCompositor::initialize(0); 661 RefPtr<LayerChromium> parent = LayerChromium::create( 0);644 RefPtr<LayerChromium> parent = LayerChromium::create(); 662 645 RefPtr<FakeCCLayerTreeHost> layerTreeHost = FakeCCLayerTreeHost::create(); 663 646 … … 667 650 668 651 // Adding a subtree to a layer already associated with a host should set the host pointer on all layers in that subtree. 669 RefPtr<LayerChromium> child = LayerChromium::create( 0);670 RefPtr<LayerChromium> grandChild = LayerChromium::create( 0);652 RefPtr<LayerChromium> child = LayerChromium::create(); 653 RefPtr<LayerChromium> grandChild = LayerChromium::create(); 671 654 child->addChild(grandChild); 672 655 673 656 // Masks, replicas, and replica masks should pick up the new host too. 674 RefPtr<LayerChromium> childMask = LayerChromium::create( 0);657 RefPtr<LayerChromium> childMask = LayerChromium::create(); 675 658 child->setMaskLayer(childMask.get()); 676 RefPtr<LayerChromium> childReplica = LayerChromium::create( 0);659 RefPtr<LayerChromium> childReplica = LayerChromium::create(); 677 660 child->setReplicaLayer(childReplica.get()); 678 RefPtr<LayerChromium> childReplicaMask = LayerChromium::create( 0);661 RefPtr<LayerChromium> childReplicaMask = LayerChromium::create(); 679 662 childReplica->setMaskLayer(childReplicaMask.get()); 680 663 … … 690 673 { 691 674 WebKit::WebCompositor::initialize(0); 692 RefPtr<LayerChromium> parent = LayerChromium::create( 0);693 RefPtr<LayerChromium> child = LayerChromium::create( 0);694 RefPtr<LayerChromium> mask = LayerChromium::create( 0);695 RefPtr<LayerChromium> replica = LayerChromium::create( 0);696 RefPtr<LayerChromium> replicaMask = LayerChromium::create( 0);675 RefPtr<LayerChromium> parent = LayerChromium::create(); 676 RefPtr<LayerChromium> child = LayerChromium::create(); 677 RefPtr<LayerChromium> mask = LayerChromium::create(); 678 RefPtr<LayerChromium> replica = LayerChromium::create(); 679 RefPtr<LayerChromium> replicaMask = LayerChromium::create(); 697 680 698 681 // Same setup as the previous test. … … 723 706 { 724 707 WebKit::WebCompositor::initialize(0); 725 RefPtr<LayerChromium> firstParent = LayerChromium::create( 0);726 RefPtr<LayerChromium> firstChild = LayerChromium::create( 0);727 RefPtr<LayerChromium> secondParent = LayerChromium::create( 0);728 RefPtr<LayerChromium> secondChild = LayerChromium::create( 0);729 RefPtr<LayerChromium> secondGrandChild = LayerChromium::create( 0);708 RefPtr<LayerChromium> firstParent = LayerChromium::create(); 709 RefPtr<LayerChromium> firstChild = LayerChromium::create(); 710 RefPtr<LayerChromium> secondParent = LayerChromium::create(); 711 RefPtr<LayerChromium> secondChild = LayerChromium::create(); 712 RefPtr<LayerChromium> secondGrandChild = LayerChromium::create(); 730 713 731 714 // First put all children under the first parent and set the first host. … … 760 743 { 761 744 WebKit::WebCompositor::initialize(0); 762 RefPtr<LayerChromium> parent = LayerChromium::create( 0);763 RefPtr<LayerChromium> mask = LayerChromium::create( 0);764 RefPtr<LayerChromium> replica = LayerChromium::create( 0);765 RefPtr<LayerChromium> maskChild = LayerChromium::create( 0);766 RefPtr<LayerChromium> replicaChild = LayerChromium::create( 0);767 RefPtr<LayerChromium> maskReplacement = LayerChromium::create( 0);768 RefPtr<LayerChromium> replicaReplacement = LayerChromium::create( 0);745 RefPtr<LayerChromium> parent = LayerChromium::create(); 746 RefPtr<LayerChromium> mask = LayerChromium::create(); 747 RefPtr<LayerChromium> replica = LayerChromium::create(); 748 RefPtr<LayerChromium> maskChild = LayerChromium::create(); 749 RefPtr<LayerChromium> replicaChild = LayerChromium::create(); 750 RefPtr<LayerChromium> maskReplacement = LayerChromium::create(); 751 RefPtr<LayerChromium> replicaReplacement = LayerChromium::create(); 769 752 770 753 parent->setMaskLayer(mask.get()); -
trunk/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp
r105314 r105460 97 97 public: 98 98 explicit FakeTiledLayerChromium(TextureManager* textureManager) 99 : TiledLayerChromium( 0)99 : TiledLayerChromium() 100 100 , m_fakeTextureUpdater(adoptRef(new FakeLayerTextureUpdater)) 101 101 , m_textureManager(textureManager) -
trunk/Source/WebKit/chromium/tests/TreeSynchronizerTest.cpp
r96454 r105460 84 84 private: 85 85 MockLayerChromium(Vector<int>* ccLayerDestructionList) 86 : LayerChromium( 0)86 : LayerChromium() 87 87 , m_ccLayerDestructionList(ccLayerDestructionList) 88 88 { … … 120 120 { 121 121 DebugScopedSetImplThread impl; 122 RefPtr<LayerChromium> layerTreeRoot = LayerChromium::create( 0);123 layerTreeRoot->addChild(LayerChromium::create( 0));124 layerTreeRoot->addChild(LayerChromium::create( 0));122 RefPtr<LayerChromium> layerTreeRoot = LayerChromium::create(); 123 layerTreeRoot->addChild(LayerChromium::create()); 124 layerTreeRoot->addChild(LayerChromium::create()); 125 125 126 126 RefPtr<CCLayerImpl> ccLayerTreeRoot = TreeSynchronizer::synchronizeTrees(layerTreeRoot.get(), 0); … … 159 159 { 160 160 DebugScopedSetImplThread impl; 161 RefPtr<LayerChromium> layerTreeRoot = LayerChromium::create( 0);162 layerTreeRoot->addChild(LayerChromium::create( 0));163 layerTreeRoot->addChild(LayerChromium::create( 0));161 RefPtr<LayerChromium> layerTreeRoot = LayerChromium::create(); 162 layerTreeRoot->addChild(LayerChromium::create()); 163 layerTreeRoot->addChild(LayerChromium::create()); 164 164 165 165 // Pick some random properties to set. The values are not important, we're just testing that at least some properties are making it through. … … 255 255 256 256 // Synchronize again. After the sync all CCLayerImpls from the old tree should be deleted. 257 RefPtr<LayerChromium> newLayerTreeRoot = LayerChromium::create( 0);257 RefPtr<LayerChromium> newLayerTreeRoot = LayerChromium::create(); 258 258 ccLayerTreeRoot = TreeSynchronizer::synchronizeTrees(newLayerTreeRoot.get(), ccLayerTreeRoot.release()); 259 259 expectTreesAreIdentical(newLayerTreeRoot.get(), ccLayerTreeRoot.get()); … … 269 269 { 270 270 DebugScopedSetImplThread impl; 271 RefPtr<LayerChromium> layerTreeRoot = LayerChromium::create( 0);272 layerTreeRoot->addChild(LayerChromium::create( 0));273 layerTreeRoot->addChild(LayerChromium::create( 0));274 layerTreeRoot->addChild(LayerChromium::create( 0));271 RefPtr<LayerChromium> layerTreeRoot = LayerChromium::create(); 272 layerTreeRoot->addChild(LayerChromium::create()); 273 layerTreeRoot->addChild(LayerChromium::create()); 274 layerTreeRoot->addChild(LayerChromium::create()); 275 275 276 276 // First child gets a mask layer. 277 RefPtr<LayerChromium> maskLayer = LayerChromium::create( 0);277 RefPtr<LayerChromium> maskLayer = LayerChromium::create(); 278 278 layerTreeRoot->children()[0]->setMaskLayer(maskLayer.get()); 279 279 280 280 // Second child gets a replica layer. 281 RefPtr<LayerChromium> replicaLayer = LayerChromium::create( 0);281 RefPtr<LayerChromium> replicaLayer = LayerChromium::create(); 282 282 layerTreeRoot->children()[1]->setReplicaLayer(replicaLayer.get()); 283 283 284 284 // Third child gets a replica layer with a mask layer. 285 RefPtr<LayerChromium> replicaLayerWithMask = LayerChromium::create( 0);286 RefPtr<LayerChromium> replicaMaskLayer = LayerChromium::create( 0);285 RefPtr<LayerChromium> replicaLayerWithMask = LayerChromium::create(); 286 RefPtr<LayerChromium> replicaMaskLayer = LayerChromium::create(); 287 287 replicaLayerWithMask->setMaskLayer(replicaMaskLayer.get()); 288 288 layerTreeRoot->children()[2]->setReplicaLayer(replicaLayerWithMask.get());
Note: See TracChangeset
for help on using the changeset viewer.