diff options
author | reveman@google.com <reveman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-04 23:43:51 +0000 |
---|---|---|
committer | reveman@google.com <reveman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-04 23:43:51 +0000 |
commit | 39e7397c2fda7077eb3e41274b5168bd6cb3d305 (patch) | |
tree | ad9a442aa2285e94c47bc5b1165555d8d40c8ede | |
parent | 30a20f0efec17060d9f1a96c9824279d04d34df6 (diff) | |
download | chromium_src-39e7397c2fda7077eb3e41274b5168bd6cb3d305.zip chromium_src-39e7397c2fda7077eb3e41274b5168bd6cb3d305.tar.gz chromium_src-39e7397c2fda7077eb3e41274b5168bd6cb3d305.tar.bz2 |
Merge 158192 - cc: Remove TextureUploaderOption.
After stopping to throttle partial uploads this option is no longer needed.
BUG=
TEST=cc_unittests
Review URL: https://chromiumcodereview.appspot.com/10961008
TBR=reveman@chromium.org
Review URL: https://codereview.chromium.org/11065027
git-svn-id: svn://svn.chromium.org/chrome/branches/1271/src@160267 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | cc/CCLayerTreeHostImpl.cpp | 4 | ||||
-rw-r--r-- | cc/CCLayerTreeHostImpl.h | 2 | ||||
-rw-r--r-- | cc/CCLayerTreeHostImplTest.cpp | 44 | ||||
-rw-r--r-- | cc/CCPrioritizedTextureTest.cpp | 2 | ||||
-rw-r--r-- | cc/CCRendererGLTest.cpp | 12 | ||||
-rw-r--r-- | cc/CCResourceProvider.cpp | 11 | ||||
-rw-r--r-- | cc/CCResourceProvider.h | 6 | ||||
-rw-r--r-- | cc/CCResourceProviderTest.cpp | 4 | ||||
-rw-r--r-- | cc/CCScopedTextureTest.cpp | 8 | ||||
-rw-r--r-- | cc/CCThreadProxy.cpp | 11 |
10 files changed, 46 insertions, 58 deletions
diff --git a/cc/CCLayerTreeHostImpl.cpp b/cc/CCLayerTreeHostImpl.cpp index 7d883c9..c8f0c9b 100644 --- a/cc/CCLayerTreeHostImpl.cpp +++ b/cc/CCLayerTreeHostImpl.cpp @@ -678,7 +678,7 @@ void CCLayerTreeHostImpl::setVisible(bool visible) setBackgroundTickingEnabled(!m_visible && m_needsAnimateLayers); } -bool CCLayerTreeHostImpl::initializeRenderer(PassOwnPtr<CCGraphicsContext> context, TextureUploaderOption textureUploader) +bool CCLayerTreeHostImpl::initializeRenderer(PassOwnPtr<CCGraphicsContext> context) { if (!context->bindToClient(this)) return false; @@ -691,7 +691,7 @@ bool CCLayerTreeHostImpl::initializeRenderer(PassOwnPtr<CCGraphicsContext> conte } OwnPtr<CCGraphicsContext> contextRef(context); - OwnPtr<CCResourceProvider> resourceProvider = CCResourceProvider::create(contextRef.get(), textureUploader); + OwnPtr<CCResourceProvider> resourceProvider = CCResourceProvider::create(contextRef.get()); OwnPtr<CCRendererGL> renderer; if (resourceProvider.get()) renderer = CCRendererGL::create(this, resourceProvider.get()); diff --git a/cc/CCLayerTreeHostImpl.h b/cc/CCLayerTreeHostImpl.h index ece6c43..6a83865 100644 --- a/cc/CCLayerTreeHostImpl.h +++ b/cc/CCLayerTreeHostImpl.h @@ -109,7 +109,7 @@ public: void finishAllRendering(); int sourceAnimationFrameNumber() const; - bool initializeRenderer(PassOwnPtr<CCGraphicsContext>, TextureUploaderOption); + bool initializeRenderer(PassOwnPtr<CCGraphicsContext>); bool isContextLost(); CCRenderer* renderer() { return m_renderer.get(); } const RendererCapabilities& rendererCapabilities() const; diff --git a/cc/CCLayerTreeHostImplTest.cpp b/cc/CCLayerTreeHostImplTest.cpp index 810002c..80b5339 100644 --- a/cc/CCLayerTreeHostImplTest.cpp +++ b/cc/CCLayerTreeHostImplTest.cpp @@ -58,7 +58,7 @@ public: settings.minimumOcclusionTrackingSize = IntSize(); m_hostImpl = CCLayerTreeHostImpl::create(settings, this); - m_hostImpl->initializeRenderer(createContext(), UnthrottledUploader); + m_hostImpl->initializeRenderer(createContext()); m_hostImpl->setViewportSize(IntSize(10, 10), IntSize(10, 10)); } @@ -79,7 +79,7 @@ public: OwnPtr<CCLayerTreeHostImpl> myHostImpl = CCLayerTreeHostImpl::create(settings, this); - myHostImpl->initializeRenderer(graphicsContext, UnthrottledUploader); + myHostImpl->initializeRenderer(graphicsContext); myHostImpl->setViewportSize(IntSize(10, 10), IntSize(10, 10)); OwnPtr<CCLayerImpl> root = rootPtr; @@ -150,7 +150,7 @@ public: void initializeRendererAndDrawFrame() { - m_hostImpl->initializeRenderer(createContext(), UnthrottledUploader); + m_hostImpl->initializeRenderer(createContext()); CCLayerTreeHostImpl::FrameData frame; EXPECT_TRUE(m_hostImpl->prepareToDraw(frame)); m_hostImpl->drawLayers(frame); @@ -317,7 +317,7 @@ TEST_F(CCLayerTreeHostImplTest, scrollWithoutRenderer) m_hostImpl = CCLayerTreeHostImpl::create(settings, this); // Initialization will fail here. - m_hostImpl->initializeRenderer(FakeWebCompositorOutputSurface::create(adoptPtr(new FakeWebGraphicsContext3DMakeCurrentFails)), UnthrottledUploader); + m_hostImpl->initializeRenderer(FakeWebCompositorOutputSurface::create(adoptPtr(new FakeWebGraphicsContext3DMakeCurrentFails))); m_hostImpl->setViewportSize(IntSize(10, 10), IntSize(10, 10)); setupScrollAndContentsLayers(IntSize(100, 100)); @@ -1673,7 +1673,7 @@ TEST_F(CCLayerTreeHostImplTest, blendingOffWhenDrawingOpaqueLayers) TEST_F(CCLayerTreeHostImplTest, viewportCovered) { - m_hostImpl->initializeRenderer(createContext(), UnthrottledUploader); + m_hostImpl->initializeRenderer(createContext()); m_hostImpl->setBackgroundColor(SK_ColorGRAY); IntSize viewportSize(1000, 1000); @@ -1784,7 +1784,7 @@ TEST_F(CCLayerTreeHostImplTest, reshapeNotCalledUntilDraw) { OwnPtr<CCGraphicsContext> ccContext = FakeWebCompositorOutputSurface::create(adoptPtr(new ReshapeTrackerContext)); ReshapeTrackerContext* reshapeTracker = static_cast<ReshapeTrackerContext*>(ccContext->context3D()); - m_hostImpl->initializeRenderer(ccContext.release(), UnthrottledUploader); + m_hostImpl->initializeRenderer(ccContext.release()); CCLayerImpl* root = new FakeDrawableCCLayerImpl(1); root->setAnchorPoint(FloatPoint(0, 0)); @@ -1833,7 +1833,7 @@ TEST_F(CCLayerTreeHostImplTest, partialSwapReceivesDamageRect) CCLayerTreeSettings settings; CCSettings::setPartialSwapEnabled(true); OwnPtr<CCLayerTreeHostImpl> layerTreeHostImpl = CCLayerTreeHostImpl::create(settings, this); - layerTreeHostImpl->initializeRenderer(ccContext.release(), UnthrottledUploader); + layerTreeHostImpl->initializeRenderer(ccContext.release()); layerTreeHostImpl->setViewportSize(IntSize(500, 500), IntSize(500, 500)); CCLayerImpl* root = new FakeDrawableCCLayerImpl(1); @@ -2120,7 +2120,7 @@ static PassOwnPtr<CCLayerTreeHostImpl> setupLayersForOpacity(bool partialSwap, C CCLayerTreeSettings settings; OwnPtr<CCLayerTreeHostImpl> myHostImpl = CCLayerTreeHostImpl::create(settings, client); - myHostImpl->initializeRenderer(context.release(), UnthrottledUploader); + myHostImpl->initializeRenderer(context.release()); myHostImpl->setViewportSize(IntSize(100, 100), IntSize(100, 100)); /* @@ -2259,7 +2259,7 @@ TEST_F(CCLayerTreeHostImplTest, contextLostAndRestoredNotificationSentToAllLayer EXPECT_FALSE(layer1->didLoseContextCalled()); EXPECT_FALSE(layer2->didLoseContextCalled()); - m_hostImpl->initializeRenderer(createContext(), UnthrottledUploader); + m_hostImpl->initializeRenderer(createContext()); EXPECT_TRUE(root->didLoseContextCalled()); EXPECT_TRUE(layer1->didLoseContextCalled()); @@ -2272,7 +2272,7 @@ TEST_F(CCLayerTreeHostImplTest, finishAllRenderingAfterContextLost) m_hostImpl = CCLayerTreeHostImpl::create(settings, this); // The context initialization will fail, but we should still be able to call finishAllRendering() without any ill effects. - m_hostImpl->initializeRenderer(FakeWebCompositorOutputSurface::create(adoptPtr(new FakeWebGraphicsContext3DMakeCurrentFails)), UnthrottledUploader); + m_hostImpl->initializeRenderer(FakeWebCompositorOutputSurface::create(adoptPtr(new FakeWebGraphicsContext3DMakeCurrentFails))); m_hostImpl->finishAllRendering(); } @@ -2554,7 +2554,7 @@ TEST_F(CCLayerTreeHostImplTest, dontUseOldResourcesAfterLostContext) rootLayer->addChild(scrollbarLayer.release()); // Use a context that supports IOSurfaces - m_hostImpl->initializeRenderer(FakeWebCompositorOutputSurface::create(adoptPtr(new FakeWebGraphicsContext3DWithIOSurface)), UnthrottledUploader); + m_hostImpl->initializeRenderer(FakeWebCompositorOutputSurface::create(adoptPtr(new FakeWebGraphicsContext3DWithIOSurface))); hwVideoFrame.setTextureId(m_hostImpl->resourceProvider()->graphicsContext3D()->createTexture()); @@ -2570,7 +2570,7 @@ TEST_F(CCLayerTreeHostImplTest, dontUseOldResourcesAfterLostContext) // Lose the context, replacing it with a StrictWebGraphicsContext3DWithIOSurface, // that will warn if any resource from the previous context gets used. - m_hostImpl->initializeRenderer(FakeWebCompositorOutputSurface::create(adoptPtr(new StrictWebGraphicsContext3DWithIOSurface)), UnthrottledUploader); + m_hostImpl->initializeRenderer(FakeWebCompositorOutputSurface::create(adoptPtr(new StrictWebGraphicsContext3DWithIOSurface))); // Create dummy resources so that looking up an old resource will get an // invalid texture id mapping. @@ -2683,7 +2683,7 @@ TEST_F(CCLayerTreeHostImplTest, layersFreeTextures) // Lose the context, replacing it with a TrackingWebGraphicsContext3D (which the CCLayerTreeHostImpl takes ownership of). OwnPtr<CCGraphicsContext> ccContext(FakeWebCompositorOutputSurface::create(adoptPtr(new TrackingWebGraphicsContext3D))); TrackingWebGraphicsContext3D* trackingWebGraphicsContext = static_cast<TrackingWebGraphicsContext3D*>(ccContext->context3D()); - m_hostImpl->initializeRenderer(ccContext.release(), UnthrottledUploader); + m_hostImpl->initializeRenderer(ccContext.release()); m_hostImpl->setRootLayer(rootLayer.release()); @@ -2755,7 +2755,7 @@ static void setupLayersForTextureCaching(CCLayerTreeHostImpl* layerTreeHostImpl, { OwnPtr<CCGraphicsContext> context = FakeWebCompositorOutputSurface::create(adoptPtr(new PartialSwapContext)); - layerTreeHostImpl->initializeRenderer(context.release(), UnthrottledUploader); + layerTreeHostImpl->initializeRenderer(context.release()); layerTreeHostImpl->setViewportSize(rootSize, rootSize); OwnPtr<CCLayerImpl> root = CCLayerImpl::create(1); @@ -2801,7 +2801,7 @@ TEST_F(CCLayerTreeHostImplTest, textureCachingWithClipping) IntSize rootSize(100, 100); - myHostImpl->initializeRenderer(context.release(), UnthrottledUploader); + myHostImpl->initializeRenderer(context.release()); myHostImpl->setViewportSize(IntSize(rootSize.width(), rootSize.height()), IntSize(rootSize.width(), rootSize.height())); OwnPtr<CCLayerImpl> root = CCLayerImpl::create(1); @@ -2913,7 +2913,7 @@ TEST_F(CCLayerTreeHostImplTest, textureCachingWithOcclusion) IntSize rootSize(1000, 1000); - myHostImpl->initializeRenderer(context.release(), UnthrottledUploader); + myHostImpl->initializeRenderer(context.release()); myHostImpl->setViewportSize(IntSize(rootSize.width(), rootSize.height()), IntSize(rootSize.width(), rootSize.height())); OwnPtr<CCLayerImpl> root = CCLayerImpl::create(1); @@ -3026,7 +3026,7 @@ TEST_F(CCLayerTreeHostImplTest, textureCachingWithOcclusionEarlyOut) IntSize rootSize(1000, 1000); - myHostImpl->initializeRenderer(context.release(), UnthrottledUploader); + myHostImpl->initializeRenderer(context.release()); myHostImpl->setViewportSize(IntSize(rootSize.width(), rootSize.height()), IntSize(rootSize.width(), rootSize.height())); OwnPtr<CCLayerImpl> root = CCLayerImpl::create(1); @@ -3140,7 +3140,7 @@ TEST_F(CCLayerTreeHostImplTest, textureCachingWithOcclusionExternalOverInternal) IntSize rootSize(1000, 1000); - myHostImpl->initializeRenderer(context.release(), UnthrottledUploader); + myHostImpl->initializeRenderer(context.release()); myHostImpl->setViewportSize(IntSize(rootSize.width(), rootSize.height()), IntSize(rootSize.width(), rootSize.height())); OwnPtr<CCLayerImpl> root = CCLayerImpl::create(1); @@ -3223,7 +3223,7 @@ TEST_F(CCLayerTreeHostImplTest, textureCachingWithOcclusionExternalNotAligned) IntSize rootSize(1000, 1000); - myHostImpl->initializeRenderer(context.release(), UnthrottledUploader); + myHostImpl->initializeRenderer(context.release()); myHostImpl->setViewportSize(IntSize(rootSize.width(), rootSize.height()), IntSize(rootSize.width(), rootSize.height())); OwnPtr<CCLayerImpl> root = CCLayerImpl::create(1); @@ -3308,7 +3308,7 @@ TEST_F(CCLayerTreeHostImplTest, textureCachingWithOcclusionPartialSwap) IntSize rootSize(1000, 1000); - myHostImpl->initializeRenderer(context.release(), UnthrottledUploader); + myHostImpl->initializeRenderer(context.release()); myHostImpl->setViewportSize(IntSize(rootSize.width(), rootSize.height()), IntSize(rootSize.width(), rootSize.height())); OwnPtr<CCLayerImpl> root = CCLayerImpl::create(1); @@ -3426,7 +3426,7 @@ TEST_F(CCLayerTreeHostImplTest, textureCachingWithScissor) IntRect grandChildRect(5, 5, 150, 150); OwnPtr<CCGraphicsContext> context = FakeWebCompositorOutputSurface::create(adoptPtr(new PartialSwapContext)); - myHostImpl->initializeRenderer(context.release(), UnthrottledUploader); + myHostImpl->initializeRenderer(context.release()); root->setAnchorPoint(FloatPoint(0, 0)); root->setPosition(FloatPoint(rootRect.x(), rootRect.y())); @@ -4183,7 +4183,7 @@ TEST_F(CCLayerTreeHostImplTest, testRemoveRenderPasses) { OwnPtr<CCGraphicsContext> context(createContext()); ASSERT_TRUE(context->context3D()); - OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get(), UnthrottledUploader)); + OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get())); OwnPtr<CCTestRenderer> renderer(CCTestRenderer::create(resourceProvider.get())); diff --git a/cc/CCPrioritizedTextureTest.cpp b/cc/CCPrioritizedTextureTest.cpp index 16eeb01..e032d8a 100644 --- a/cc/CCPrioritizedTextureTest.cpp +++ b/cc/CCPrioritizedTextureTest.cpp @@ -29,7 +29,7 @@ public: , m_context(WebKit::createFakeCCGraphicsContext()) { DebugScopedSetImplThread implThread; - m_resourceProvider = CCResourceProvider::create(m_context.get(), UnthrottledUploader); + m_resourceProvider = CCResourceProvider::create(m_context.get()); } virtual ~CCPrioritizedTextureTest() diff --git a/cc/CCRendererGLTest.cpp b/cc/CCRendererGLTest.cpp index 14986e6..f3a1f0e 100644 --- a/cc/CCRendererGLTest.cpp +++ b/cc/CCRendererGLTest.cpp @@ -113,7 +113,7 @@ protected: , m_suggestHaveBackbufferNo(1, false) , m_compositorInitializer(0) , m_context(FakeWebCompositorOutputSurface::create(adoptPtr(new FrameCountingMemoryAllocationSettingContext()))) - , m_resourceProvider(CCResourceProvider::create(m_context.get(), UnthrottledUploader)) + , m_resourceProvider(CCResourceProvider::create(m_context.get())) , m_renderer(&m_mockClient, m_resourceProvider.get()) { } @@ -298,7 +298,7 @@ TEST(CCRendererGLTest2, initializationDoesNotMakeSynchronousCalls) CCScopedSettings scopedSettings; FakeCCRendererClient mockClient; OwnPtr<CCGraphicsContext> context(FakeWebCompositorOutputSurface::create(adoptPtr(new ForbidSynchronousCallContext))); - OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get(), UnthrottledUploader)); + OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get())); FakeCCRendererGL renderer(&mockClient, resourceProvider.get()); EXPECT_TRUE(renderer.initialize()); @@ -342,7 +342,7 @@ TEST(CCRendererGLTest2, initializationWithQuicklyLostContextDoesNotAssert) CCScopedSettings scopedSettings; FakeCCRendererClient mockClient; OwnPtr<CCGraphicsContext> context(FakeWebCompositorOutputSurface::create(adoptPtr(new LoseContextOnFirstGetContext))); - OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get(), UnthrottledUploader)); + OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get())); FakeCCRendererGL renderer(&mockClient, resourceProvider.get()); renderer.initialize(); @@ -364,7 +364,7 @@ TEST(CCRendererGLTest2, initializationWithoutGpuMemoryManagerExtensionSupportSho { FakeCCRendererClient mockClient; OwnPtr<CCGraphicsContext> context(FakeWebCompositorOutputSurface::create(adoptPtr(new ContextThatDoesNotSupportMemoryManagmentExtensions))); - OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get(), UnthrottledUploader)); + OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get())); FakeCCRendererGL renderer(&mockClient, resourceProvider.get()); renderer.initialize(); @@ -392,7 +392,7 @@ TEST(CCRendererGLTest2, opaqueBackground) FakeCCRendererClient mockClient; OwnPtr<CCGraphicsContext> ccContext(FakeWebCompositorOutputSurface::create(adoptPtr(new ClearCountingContext))); ClearCountingContext* context = static_cast<ClearCountingContext*>(ccContext->context3D()); - OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(ccContext.get(), UnthrottledUploader)); + OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(ccContext.get())); FakeCCRendererGL renderer(&mockClient, resourceProvider.get()); mockClient.rootRenderPass()->setHasTransparentBackground(false); @@ -415,7 +415,7 @@ TEST(CCRendererGLTest2, transparentBackground) FakeCCRendererClient mockClient; OwnPtr<CCGraphicsContext> ccContext(FakeWebCompositorOutputSurface::create(adoptPtr(new ClearCountingContext))); ClearCountingContext* context = static_cast<ClearCountingContext*>(ccContext->context3D()); - OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(ccContext.get(), UnthrottledUploader)); + OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(ccContext.get())); FakeCCRendererGL renderer(&mockClient, resourceProvider.get()); mockClient.rootRenderPass()->setHasTransparentBackground(true); diff --git a/cc/CCResourceProvider.cpp b/cc/CCResourceProvider.cpp index 4c58769..df16815 100644 --- a/cc/CCResourceProvider.cpp +++ b/cc/CCResourceProvider.cpp @@ -49,10 +49,10 @@ static bool isTextureFormatSupportedForStorage(GC3Denum format) return (format == GraphicsContext3D::RGBA || format == Extensions3D::BGRA_EXT); } -PassOwnPtr<CCResourceProvider> CCResourceProvider::create(CCGraphicsContext* context, TextureUploaderOption option) +PassOwnPtr<CCResourceProvider> CCResourceProvider::create(CCGraphicsContext* context) { OwnPtr<CCResourceProvider> resourceProvider(adoptPtr(new CCResourceProvider(context))); - if (!resourceProvider->initialize(option)) + if (!resourceProvider->initialize()) return nullptr; return resourceProvider.release(); } @@ -389,7 +389,7 @@ CCResourceProvider::CCResourceProvider(CCGraphicsContext* context) { } -bool CCResourceProvider::initialize(TextureUploaderOption textureUploaderOption) +bool CCResourceProvider::initialize() { ASSERT(CCProxy::isImplThread()); WebGraphicsContext3D* context3d = m_context->context3D(); @@ -424,10 +424,7 @@ bool CCResourceProvider::initialize(TextureUploaderOption textureUploaderOption) m_texSubImage = adoptPtr(new LayerTextureSubImage(useMapSub)); m_textureCopier = AcceleratedTextureCopier::create(context3d, useBindUniform); - if (textureUploaderOption == ThrottledUploader) - m_textureUploader = ThrottledTextureUploader::create(context3d); - else - m_textureUploader = UnthrottledTextureUploader::create(); + m_textureUploader = ThrottledTextureUploader::create(context3d); GLC(context3d, context3d->getIntegerv(GraphicsContext3D::MAX_TEXTURE_SIZE, &m_maxTextureSize)); return true; } diff --git a/cc/CCResourceProvider.h b/cc/CCResourceProvider.h index 83f27ef..d64e900 100644 --- a/cc/CCResourceProvider.h +++ b/cc/CCResourceProvider.h @@ -26,8 +26,6 @@ class WebGraphicsContext3D; namespace cc { -enum TextureUploaderOption { ThrottledUploader, UnthrottledUploader }; - class IntRect; class LayerTextureSubImage; class TextureCopier; @@ -61,7 +59,7 @@ public: unsigned syncPoint; }; - static PassOwnPtr<CCResourceProvider> create(CCGraphicsContext*, TextureUploaderOption); + static PassOwnPtr<CCResourceProvider> create(CCGraphicsContext*); virtual ~CCResourceProvider(); @@ -264,7 +262,7 @@ private: typedef HashMap<int, Child> ChildMap; explicit CCResourceProvider(CCGraphicsContext*); - bool initialize(TextureUploaderOption); + bool initialize(); const Resource* lockForRead(ResourceId); void unlockForRead(ResourceId); diff --git a/cc/CCResourceProviderTest.cpp b/cc/CCResourceProviderTest.cpp index caf90fd..69a4de2 100644 --- a/cc/CCResourceProviderTest.cpp +++ b/cc/CCResourceProviderTest.cpp @@ -271,7 +271,7 @@ public: CCResourceProviderTest() : m_sharedData(ContextSharedData::create()) , m_context(FakeWebCompositorOutputSurface::create(ResourceProviderContext::create(m_sharedData.get()))) - , m_resourceProvider(CCResourceProvider::create(m_context.get(), UnthrottledUploader)) + , m_resourceProvider(CCResourceProvider::create(m_context.get())) { m_resourceProvider->setDefaultResourceType(GetParam()); } @@ -417,7 +417,7 @@ TEST_P(CCResourceProviderTest, TransferResources) return; OwnPtr<CCGraphicsContext> childContext(FakeWebCompositorOutputSurface::create(ResourceProviderContext::create(m_sharedData.get()))); - OwnPtr<CCResourceProvider> childResourceProvider(CCResourceProvider::create(childContext.get(), UnthrottledUploader)); + OwnPtr<CCResourceProvider> childResourceProvider(CCResourceProvider::create(childContext.get())); IntSize size(1, 1); WGC3Denum format = GraphicsContext3D::RGBA; diff --git a/cc/CCScopedTextureTest.cpp b/cc/CCScopedTextureTest.cpp index c3046ea..88194b8 100644 --- a/cc/CCScopedTextureTest.cpp +++ b/cc/CCScopedTextureTest.cpp @@ -23,7 +23,7 @@ TEST(CCScopedTextureTest, NewScopedTexture) { OwnPtr<CCGraphicsContext> context(createFakeCCGraphicsContext()); DebugScopedSetImplThread implThread; - OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get(), UnthrottledUploader)); + OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get())); OwnPtr<CCScopedTexture> texture = CCScopedTexture::create(resourceProvider.get()); // New scoped textures do not hold a texture yet. @@ -38,7 +38,7 @@ TEST(CCScopedTextureTest, CreateScopedTexture) { OwnPtr<CCGraphicsContext> context(createFakeCCGraphicsContext()); DebugScopedSetImplThread implThread; - OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get(), UnthrottledUploader)); + OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get())); OwnPtr<CCScopedTexture> texture = CCScopedTexture::create(resourceProvider.get()); texture->allocate(CCRenderer::ImplPool, IntSize(30, 30), GraphicsContext3D::RGBA, CCResourceProvider::TextureUsageAny); @@ -55,7 +55,7 @@ TEST(CCScopedTextureTest, ScopedTextureIsDeleted) { OwnPtr<CCGraphicsContext> context(createFakeCCGraphicsContext()); DebugScopedSetImplThread implThread; - OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get(), UnthrottledUploader)); + OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get())); { OwnPtr<CCScopedTexture> texture = CCScopedTexture::create(resourceProvider.get()); @@ -83,7 +83,7 @@ TEST(CCScopedTextureTest, LeakScopedTexture) { OwnPtr<CCGraphicsContext> context(createFakeCCGraphicsContext()); DebugScopedSetImplThread implThread; - OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get(), UnthrottledUploader)); + OwnPtr<CCResourceProvider> resourceProvider(CCResourceProvider::create(context.get())); { OwnPtr<CCScopedTexture> texture = CCScopedTexture::create(resourceProvider.get()); diff --git a/cc/CCThreadProxy.cpp b/cc/CCThreadProxy.cpp index 41d1877..11cd682 100644 --- a/cc/CCThreadProxy.cpp +++ b/cc/CCThreadProxy.cpp @@ -31,13 +31,6 @@ static const double contextRecreationTickRate = 0.03; namespace cc { -namespace { - -// Type of texture uploader to use for texture updates. -static TextureUploaderOption textureUploader = ThrottledUploader; - -} // anonymous namespace - PassOwnPtr<CCProxy> CCThreadProxy::create(CCLayerTreeHost* layerTreeHost) { return adoptPtr(new CCThreadProxy(layerTreeHost)); @@ -873,7 +866,7 @@ void CCThreadProxy::initializeRendererOnImplThread(CCCompletionEvent* completion TRACE_EVENT0("cc", "CCThreadProxy::initializeRendererOnImplThread"); ASSERT(isImplThread()); ASSERT(m_contextBeforeInitializationOnImplThread); - *initializeSucceeded = m_layerTreeHostImpl->initializeRenderer(m_contextBeforeInitializationOnImplThread.release(), textureUploader); + *initializeSucceeded = m_layerTreeHostImpl->initializeRenderer(m_contextBeforeInitializationOnImplThread.release()); if (*initializeSucceeded) { *capabilities = m_layerTreeHostImpl->rendererCapabilities(); m_schedulerOnImplThread->setSwapBuffersCompleteSupported( @@ -912,7 +905,7 @@ void CCThreadProxy::recreateContextOnImplThread(CCCompletionEvent* completion, C ASSERT(isImplThread()); if (!m_layerTreeHostImpl->contentsTexturesPurged()) m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->resourceProvider()); - *recreateSucceeded = m_layerTreeHostImpl->initializeRenderer(adoptPtr(contextPtr), textureUploader); + *recreateSucceeded = m_layerTreeHostImpl->initializeRenderer(adoptPtr(contextPtr)); if (*recreateSucceeded) { *capabilities = m_layerTreeHostImpl->rendererCapabilities(); m_schedulerOnImplThread->didRecreateContext(); |