Changeset 112286 in webkit
- Timestamp:
- Mar 27, 2012 11:18:42 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 3 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r112284 r112286 1 2012-03-27 Sami Kyostila <skyostil@chromium.org> 2 3 [chromium] Add TextureCopier for copying texture contents 4 https://bugs.webkit.org/show_bug.cgi?id=80870 5 6 Reviewed by Stephen White. 7 8 This patch introduces a TextureCopier class whose job is to copy the 9 contents from one GL texture to another using the most efficient means 10 for the current GPU. This version uses render-to-texture to do the copy, 11 but a path based on EXT_framebuffer_blit can be added later. 12 13 The class is intended to replace the use of image path operations such 14 as glCopyTex{Sub}Image2D for duplicating texture contents. The reason is 15 that such functions may not be very well optimized in some -- mainly 16 mobile -- GPU drivers. 17 18 With this patch the new copier is used just for Canvas2D layer 19 presentation, but another potential use is for WebGL layer presentation. 20 21 Test: webkit_unit_tests: TextureCopierTest 22 23 * WebCore.gypi: 24 * platform/graphics/chromium/Canvas2DLayerChromium.cpp: 25 (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): 26 (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): 27 (WebCore::Canvas2DLayerChromium::updateCompositorResources): 28 * platform/graphics/chromium/Canvas2DLayerChromium.h: 29 (Canvas2DLayerChromium): 30 * platform/graphics/chromium/LayerRendererChromium.cpp: 31 (WebCore::LayerRendererChromium::initializeSharedObjects): 32 * platform/graphics/chromium/LayerRendererChromium.h: 33 (WebCore): 34 (WebCore::LayerRendererChromium::textureCopier): 35 (LayerRendererChromium): 36 * platform/graphics/chromium/ShaderChromium.cpp: 37 (WebCore::VertexShaderPosTexIdentity::getShaderString): 38 (WebCore): 39 (WebCore::FragmentShaderRGBATexCopy::getShaderString): 40 * platform/graphics/chromium/ShaderChromium.h: 41 (VertexShaderPosTexIdentity): 42 (WebCore::VertexShaderPosTexIdentity::init): 43 (WebCore): 44 (FragmentShaderRGBATexCopy): 45 * platform/graphics/chromium/TextureCopier.cpp: Added. 46 (WebCore): 47 (WebCore::AcceleratedTextureCopier::AcceleratedTextureCopier): 48 (WebCore::AcceleratedTextureCopier::~AcceleratedTextureCopier): 49 (WebCore::AcceleratedTextureCopier::copyTexture): 50 * platform/graphics/chromium/TextureCopier.h: Added. 51 (WebCore): 52 (TextureCopier): 53 (WebCore::TextureCopier::~TextureCopier): 54 (AcceleratedTextureCopier): 55 (WebCore::AcceleratedTextureCopier::create): 56 * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: 57 (WebCore::CCSingleThreadProxy::doCommit): 58 * platform/graphics/chromium/cc/CCTextureUpdater.cpp: 59 (WebCore::CCTextureUpdater::CCTextureUpdater): 60 * platform/graphics/chromium/cc/CCTextureUpdater.h: 61 (WebCore): 62 (CCTextureUpdater): 63 (WebCore::CCTextureUpdater::copier): 64 * platform/graphics/chromium/cc/CCThreadProxy.cpp: 65 (WebCore::CCThreadProxy::beginFrameCompleteOnImplThread): 66 1 67 2012-03-27 Levi Weintraub <leviw@chromium.org> 2 68 -
trunk/Source/WebCore/WebCore.gypi
r112224 r112286 3526 3526 'platform/graphics/chromium/TrackingTextureAllocator.cpp', 3527 3527 'platform/graphics/chromium/TrackingTextureAllocator.h', 3528 'platform/graphics/chromium/TextureCopier.cpp', 3529 'platform/graphics/chromium/TextureCopier.h', 3528 3530 'platform/graphics/chromium/TextureManager.cpp', 3529 3531 'platform/graphics/chromium/TextureManager.h', -
trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp
r112165 r112286 38 38 #include "GraphicsContext3D.h" 39 39 #include "LayerRendererChromium.h" // For the GLC() macro 40 #include "TextureCopier.h" 40 41 #include "cc/CCLayerTreeHost.h" 41 42 #include "cc/CCTextureLayerImpl.h" … … 57 58 , m_size(size) 58 59 , m_backTextureId(0) 59 , m_fbo(0)60 60 , m_useDoubleBuffering(CCProxy::hasImplThread()) 61 61 , m_canvas(0) 62 62 { 63 if (m_useDoubleBuffering)64 GLC(m_context, m_fbo = m_context->createFramebuffer());65 63 } 66 64 67 65 Canvas2DLayerChromium::~Canvas2DLayerChromium() 68 66 { 69 if (m_useDoubleBuffering && m_fbo)70 GLC(m_context, m_context->deleteFramebuffer(m_fbo));71 67 if (m_context && layerTreeHost()) 72 68 layerTreeHost()->stopRateLimiter(m_context.get()); … … 139 135 return; 140 136 141 m_frontTexture->bindTexture(context, updater.allocator()); 142 143 GLC(context, context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, m_fbo)); 144 GLC(context, context->framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::COLOR_ATTACHMENT0, GraphicsContext3D::TEXTURE_2D, m_backTextureId, 0)); 145 // FIXME: The copy operation will fail if the m_backTexture is allocated as BGRA since glCopyTex(Sub)Image2D doesn't 146 // support the BGRA format. See bug https://bugs.webkit.org/show_bug.cgi?id=75142 147 GLC(context, context->copyTexSubImage2D(GraphicsContext3D::TEXTURE_2D, 0, 0, 0, 0, 0, m_size.width(), m_size.height())); 148 GLC(context, context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, 0)); 149 GLC(context, context->flush()); 137 m_frontTexture->allocate(updater.allocator()); 138 updater.copier()->copyTexture(context, m_backTextureId, m_frontTexture->textureId(), m_size); 150 139 } 151 140 -
trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.h
r110945 r112286 73 73 IntSize m_size; 74 74 unsigned m_backTextureId; 75 Platform3DObject m_fbo;76 75 // When m_useDoubleBuffering is true, the compositor will draw using a copy of the 77 76 // canvas' backing texture. This option should be used with the compositor doesn't -
trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
r111968 r112286 46 46 #include "RenderSurfaceChromium.h" 47 47 #include "TextStream.h" 48 #include "TextureCopier.h" 48 49 #include "TextureManager.h" 49 50 #include "TraceEvent.h" … … 1298 1299 TextureManager::reclaimLimitBytes(viewportSize()), 1299 1300 m_capabilities.maxTextureSize); 1301 m_textureCopier = AcceleratedTextureCopier::create(m_context.get()); 1300 1302 m_contentsTextureAllocator = TrackingTextureAllocator::create(m_context.get()); 1301 1303 m_renderSurfaceTextureAllocator = TrackingTextureAllocator::create(m_context.get()); … … 1610 1612 if (m_offscreenFramebufferId) 1611 1613 GLC(m_context.get(), m_context->deleteFramebuffer(m_offscreenFramebufferId)); 1614 m_textureCopier.clear(); 1612 1615 1613 1616 releaseRenderSurfaceTextures(); -
trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h
r111777 r112286 39 39 #include "IntRect.h" 40 40 #include "LayerChromium.h" 41 #include "TextureCopier.h" 41 42 #include "TrackingTextureAllocator.h" 42 43 #include "VideoLayerChromium.h" … … 60 61 class GeometryBinding; 61 62 class GraphicsContext3D; 62 class TrackingTextureAllocator;63 63 class LayerRendererSwapBuffersCompleteCallbackAdapter; 64 64 class ScopedEnsureFramebufferAllocation; … … 143 143 144 144 TextureManager* renderSurfaceTextureManager() const { return m_renderSurfaceTextureManager.get(); } 145 TextureCopier* textureCopier() const { return m_textureCopier.get(); } 145 146 TextureAllocator* renderSurfaceTextureAllocator() const { return m_renderSurfaceTextureAllocator.get(); } 146 147 TextureAllocator* contentsTextureAllocator() const { return m_contentsTextureAllocator.get(); } … … 250 251 251 252 OwnPtr<TextureManager> m_renderSurfaceTextureManager; 253 OwnPtr<AcceleratedTextureCopier> m_textureCopier; 252 254 OwnPtr<TrackingTextureAllocator> m_contentsTextureAllocator; 253 255 OwnPtr<TrackingTextureAllocator> m_renderSurfaceTextureAllocator; -
trunk/Source/WebCore/platform/graphics/chromium/ShaderChromium.cpp
r108675 r112286 189 189 } 190 190 191 String VertexShaderPosTexIdentity::getShaderString() const 192 { 193 return SHADER( 194 attribute vec4 a_position; 195 varying vec2 v_texCoord; 196 void main() 197 { 198 gl_Position = a_position; 199 v_texCoord = (a_position.xy + vec2(1.0)) * 0.5; 200 } 201 ); 202 } 203 191 204 void VertexShaderQuad::init(GraphicsContext3D* context, unsigned program) 192 205 { … … 411 424 } 412 425 426 String FragmentShaderRGBATex::getShaderString() const 427 { 428 return SHADER( 429 precision mediump float; 430 varying vec2 v_texCoord; 431 uniform sampler2D s_texture; 432 void main() 433 { 434 gl_FragColor = texture2D(s_texture, v_texCoord); 435 } 436 ); 437 } 438 413 439 String FragmentShaderRGBATexSwizzleAlpha::getShaderString() const 414 440 { -
trunk/Source/WebCore/platform/graphics/chromium/ShaderChromium.h
r110267 r112286 96 96 }; 97 97 98 class VertexShaderPosTexIdentity { 99 public: 100 void init(GraphicsContext3D*, unsigned program) { } 101 String getShaderString() const; 102 }; 103 98 104 class VertexShaderPosTexTransform { 99 105 public: … … 214 220 }; 215 221 222 class FragmentShaderRGBATex : public FragmentTexOpaqueBinding { 223 public: 224 String getShaderString() const; 225 }; 226 216 227 // Swizzles the red and blue component of sampled texel with alpha. 217 228 class FragmentShaderRGBATexSwizzleAlpha : public FragmentTexAlphaBinding { -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp
r112191 r112286 203 203 204 204 m_layerTreeHost->beginCommitOnImplThread(m_layerTreeHostImpl.get()); 205 CCTextureUpdater updater(m_layerTreeHostImpl->contentsTextureAllocator() );205 CCTextureUpdater updater(m_layerTreeHostImpl->contentsTextureAllocator(), m_layerTreeHostImpl->layerRenderer()->textureCopier()); 206 206 m_layerTreeHost->updateCompositorResources(m_layerTreeHostImpl->context(), updater); 207 207 updater.update(m_layerTreeHostImpl->context(), numeric_limits<size_t>::max()); -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCTextureUpdater.cpp
r107177 r112286 38 38 namespace WebCore { 39 39 40 CCTextureUpdater::CCTextureUpdater(TextureAllocator* allocator )40 CCTextureUpdater::CCTextureUpdater(TextureAllocator* allocator, TextureCopier* copier) 41 41 : m_allocator(allocator) 42 , m_copier(copier) 42 43 , m_entryIndex(0) 43 44 { -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCTextureUpdater.h
r107177 r112286 35 35 class GraphicsContext3D; 36 36 class TextureAllocator; 37 class TextureCopier; 37 38 38 39 class CCTextureUpdater { 39 40 public: 40 CCTextureUpdater(TextureAllocator* );41 CCTextureUpdater(TextureAllocator*, TextureCopier*); 41 42 ~CCTextureUpdater(); 42 43 … … 52 53 53 54 TextureAllocator* allocator() { return m_allocator; } 55 TextureCopier* copier() { return m_copier; } 54 56 55 57 private: … … 63 65 64 66 TextureAllocator* m_allocator; 67 TextureCopier* m_copier; 65 68 size_t m_entryIndex; 66 69 Vector<UpdateEntry> m_entries; -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp
r112191 r112286 28 28 29 29 #include "GraphicsContext3D.h" 30 #include "LayerRendererChromium.h" 30 31 #include "SharedGraphicsContext3D.h" 31 32 #include "TraceEvent.h" … … 504 505 505 506 ASSERT(!m_currentTextureUpdaterOnImplThread); 506 m_currentTextureUpdaterOnImplThread = adoptPtr(new CCTextureUpdater(m_layerTreeHostImpl->contentsTextureAllocator() ));507 m_currentTextureUpdaterOnImplThread = adoptPtr(new CCTextureUpdater(m_layerTreeHostImpl->contentsTextureAllocator(), m_layerTreeHostImpl->layerRenderer()->textureCopier())); 507 508 m_layerTreeHost->updateCompositorResources(m_layerTreeHostImpl->context(), *m_currentTextureUpdaterOnImplThread); 508 509 -
trunk/Source/WebKit/chromium/ChangeLog
r112278 r112286 1 2012-03-27 Sami Kyostila <skyostil@chromium.org> 2 3 [chromium] Add TextureCopier for copying texture contents 4 https://bugs.webkit.org/show_bug.cgi?id=80870 5 6 Reviewed by Stephen White. 7 8 Add new test for TextureCopier. 9 10 * WebKit.gypi: 11 * tests/Canvas2DLayerChromiumTest.cpp: 12 * tests/TextureCopierTest.cpp: Added. 13 * tests/TiledLayerChromiumTest.cpp: 14 (FakeTextureCopier): 15 (WTF::FakeTextureCopier::copyTexture): 16 (WTF): 17 (WTF::TEST): 18 1 19 2012-03-27 Stephen White <senorblanco@chromium.org> 2 20 -
trunk/Source/WebKit/chromium/WebKit.gypi
r111777 r112286 120 120 'tests/RenderTableCellTest.cpp', 121 121 'tests/ScrollbarLayerChromiumTest.cpp', 122 'tests/TextureCopierTest.cpp', 122 123 'tests/TextureManagerTest.cpp', 123 124 'tests/TiledLayerChromiumTest.cpp', -
trunk/Source/WebKit/chromium/tests/Canvas2DLayerChromiumTest.cpp
r111112 r112286 32 32 #include "GraphicsContext3DPrivate.h" 33 33 #include "Region.h" 34 #include "TextureCopier.h" 34 35 #include "TextureManager.h" 35 36 #include "WebCompositor.h" … … 93 94 }; 94 95 96 class MockTextureCopier : public TextureCopier { 97 public: 98 MOCK_METHOD4(copyTexture, void(GraphicsContext3D*, unsigned, unsigned, const IntSize&)); 99 }; 100 95 101 class Canvas2DLayerChromiumTest : public Test { 96 102 protected: … … 102 108 RefPtr<GraphicsContext3D> implContext = GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(new MockCanvasContext()), GraphicsContext3D::RenderDirectlyToHostWindow); 103 109 104 MockCanvasContext& mainMock = *static_cast<MockCanvasContext*>(GraphicsContext3DPrivate::extractWebGraphicsContext3D(mainContext.get()));105 MockCanvasContext& implMock = *static_cast<MockCanvasContext*>(GraphicsContext3DPrivate::extractWebGraphicsContext3D(implContext.get()));106 107 110 MockTextureAllocator allocatorMock; 108 CCTextureUpdater updater(&allocatorMock); 111 MockTextureCopier copierMock; 112 CCTextureUpdater updater(&allocatorMock, &copierMock); 109 113 110 114 const IntSize size(300, 150); … … 121 125 const WebGLId backTextureId = 1; 122 126 const WebGLId frontTextureId = 2; 123 const WebGLId fboId = 3;124 127 { 125 128 InSequence sequence; … … 128 131 // compositor. 129 132 if (threaded) { 130 // Setup Canvas2DLayerChromium (on the main thread).131 EXPECT_CALL(mainMock, createFramebuffer())132 .WillOnce(Return(fboId));133 134 133 // Create texture and do the copy (on the impl thread). 135 134 EXPECT_CALL(allocatorMock, createTexture(size, GraphicsContext3D::RGBA)) 136 135 .WillOnce(Return(frontTextureId)); 137 EXPECT_CALL(implMock, bindTexture(GraphicsContext3D::TEXTURE_2D, frontTextureId)); 138 EXPECT_CALL(implMock, bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, fboId)); 139 EXPECT_CALL(implMock, framebufferTexture2D(GraphicsContext3D::FRAMEBUFFER, GraphicsContext3D::COLOR_ATTACHMENT0, GraphicsContext3D::TEXTURE_2D, backTextureId, 0)); 140 EXPECT_CALL(implMock, copyTexSubImage2D(GraphicsContext3D::TEXTURE_2D, 0, 0, 0, 0, 0, 300, 150)); 141 EXPECT_CALL(implMock, bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, 0)); 142 143 // Teardown Canvas2DLayerChromium. 144 EXPECT_CALL(mainMock, deleteFramebuffer(fboId)); 136 EXPECT_CALL(copierMock, copyTexture(implContext.get(), backTextureId, frontTextureId, size)); 145 137 146 138 // Teardown TextureManager. -
trunk/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp
r112049 r112286 32 32 #include "LayerTextureUpdater.h" 33 33 #include "Region.h" 34 #include "TextureCopier.h" 34 35 #include "TextureManager.h" 35 36 #include "WebCompositor.h" … … 74 75 virtual unsigned createTexture(const IntSize&, GC3Denum) { return 1; } 75 76 virtual void deleteTexture(unsigned, const IntSize&, GC3Denum) { } 77 }; 78 79 class FakeTextureCopier : public TextureCopier { 80 public: 81 virtual void copyTexture(GraphicsContext3D*, unsigned, unsigned, const IntSize&) { } 76 82 }; 77 83 … … 244 250 } 245 251 252 class FakeCCTextureUpdater : public CCTextureUpdater { 253 public: 254 explicit FakeCCTextureUpdater() 255 : CCTextureUpdater(&m_textureAllocator, &m_textureCopier) 256 { 257 } 258 259 FakeTextureAllocator& textureAllocator() 260 { 261 return m_textureAllocator; 262 } 263 264 protected: 265 FakeTextureAllocator m_textureAllocator; 266 FakeTextureCopier m_textureCopier; 267 }; 268 246 269 TEST(TiledLayerChromiumTest, pushDirtyTiles) 247 270 { … … 251 274 OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); 252 275 253 FakeTextureAllocator textureAllocator; 254 CCTextureUpdater updater(&textureAllocator); 276 FakeCCTextureUpdater updater; 255 277 256 278 // The tile size is 100x100, so this invalidates and then paints two tiles. … … 287 309 TestCCOcclusionTracker occluded; 288 310 289 FakeTextureAllocator textureAllocator; 290 CCTextureUpdater updater(&textureAllocator); 311 FakeCCTextureUpdater updater; 291 312 292 313 // The tile size is 100x100, so this invalidates and then paints two tiles. … … 333 354 OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); 334 355 335 FakeTextureAllocator textureAllocator; 336 CCTextureUpdater updater(&textureAllocator); 356 FakeCCTextureUpdater updater; 337 357 338 358 // The tile size is 100x100, so this invalidates and then paints two tiles. … … 347 367 EXPECT_TRUE(layerImpl->hasTileAt(0, 1)); 348 368 349 textureManager->evictAndDeleteAllTextures(& textureAllocator);369 textureManager->evictAndDeleteAllTextures(&updater.textureAllocator()); 350 370 textureManager->setMaxMemoryLimitBytes(4*1024*1024); 351 371 textureManager->setPreferredMemoryLimitBytes(4*1024*1024); … … 375 395 OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); 376 396 377 FakeTextureAllocator textureAllocator; 378 CCTextureUpdater updater(&textureAllocator); 397 FakeCCTextureUpdater updater; 379 398 380 399 // The tile size is 100x100. Setup 5x5 tiles with one visible tile in the center. … … 434 453 OwnPtr<FakeCCTiledLayerImpl> layerImpl2(adoptPtr(new FakeCCTiledLayerImpl(0))); 435 454 436 FakeTextureAllocator textureAllocator; 437 CCTextureUpdater updater(&textureAllocator); 455 FakeCCTextureUpdater updater; 438 456 439 457 // For this test we have two layers. layer1 exhausts most texture memory, leaving room for 2 more tiles from … … 515 533 TestCCOcclusionTracker occluded; 516 534 517 FakeTextureAllocator textureAllocator; 518 CCTextureUpdater updater(&textureAllocator); 535 FakeCCTextureUpdater updater; 519 536 520 537 // The tile size is 100x100, so this invalidates one occluded tile, culls it during paint, but prepaints it. … … 541 558 OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); 542 559 543 FakeTextureAllocator textureAllocator; 544 CCTextureUpdater updater(&textureAllocator); 560 FakeCCTextureUpdater updater; 545 561 546 562 // The tile size is 100x100, so this invalidates and then paints two tiles. … … 568 584 OwnPtr<FakeCCTiledLayerImpl> layer2Impl(adoptPtr(new FakeCCTiledLayerImpl(0))); 569 585 570 FakeTextureAllocator textureAllocator; 571 CCTextureUpdater updater(&textureAllocator); 586 FakeCCTextureUpdater updater; 572 587 573 588 layer1->setBounds(IntSize(100, 200)); … … 604 619 OwnPtr<FakeCCTiledLayerImpl> layer2Impl(adoptPtr(new FakeCCTiledLayerImpl(0))); 605 620 606 FakeTextureAllocator textureAllocator; 607 CCTextureUpdater updater(&textureAllocator); 621 FakeCCTextureUpdater updater; 608 622 609 623 layer1->setBounds(IntSize(100, 200)); … … 646 660 OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); 647 661 648 FakeTextureAllocator textureAllocator; 649 CCTextureUpdater updater(&textureAllocator); 662 FakeCCTextureUpdater updater; 650 663 651 664 // This invalidates 9 tiles and then paints one visible tile. … … 682 695 OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); 683 696 684 FakeTextureAllocator textureAllocator; 685 CCTextureUpdater updater(&textureAllocator); 697 FakeCCTextureUpdater updater; 686 698 687 699 // The layer's bounds are empty. … … 725 737 OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); 726 738 727 FakeTextureAllocator textureAllocator; 728 CCTextureUpdater updater(&textureAllocator); 739 FakeCCTextureUpdater updater; 729 740 730 741 // Pretend the layer is animating. … … 774 785 OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); 775 786 776 FakeTextureAllocator textureAllocator; 777 CCTextureUpdater updater(&textureAllocator); 787 FakeCCTextureUpdater updater; 778 788 779 789 // Invalidate the layer but make none of it visible, so nothing paints. … … 829 839 DebugScopedSetImplThread implThread; 830 840 831 FakeTextureAllocator textureAllocator; 832 CCTextureUpdater updater(&textureAllocator); 841 FakeCCTextureUpdater updater; 833 842 834 843 int tileWidth = FakeTiledLayerChromium::tileSize().width(); … … 887 896 OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); 888 897 889 FakeTextureAllocator textureAllocator; 890 CCTextureUpdater updater(&textureAllocator); 898 FakeCCTextureUpdater updater; 891 899 892 900 // The tile size is 100x100, so this invalidates and then paints two tiles. … … 929 937 RefPtr<FakeTiledLayerWithScaledBounds> layer = adoptRef(new FakeTiledLayerWithScaledBounds(textureManager.get())); 930 938 931 FakeTextureAllocator textureAllocator; 932 CCTextureUpdater updater(&textureAllocator); 939 FakeCCTextureUpdater updater; 933 940 934 941 IntRect layerBounds(0, 0, 300, 200); … … 967 974 OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); 968 975 969 FakeTextureAllocator textureAllocator; 970 CCTextureUpdater updater(&textureAllocator); 976 FakeCCTextureUpdater updater; 971 977 972 978 // Create a layer with one tile. … … 1038 1044 childLayer->invalidateRect(contentRect); 1039 1045 1040 FakeTextureAllocator textureAllocator; 1041 CCTextureUpdater updater(&textureAllocator); 1046 FakeCCTextureUpdater updater; 1042 1047 1043 1048 ccLayerTreeHost->setRootLayer(rootLayer); … … 1097 1102 layer->invalidateRect(contentRect); 1098 1103 1099 FakeTextureAllocator textureAllocator; 1100 CCTextureUpdater updater(&textureAllocator); 1104 FakeCCTextureUpdater updater; 1101 1105 1102 1106 ccLayerTreeHost->setRootLayer(layer);
Note: See TracChangeset
for help on using the changeset viewer.