diff options
author | reveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-22 22:22:10 +0000 |
---|---|---|
committer | reveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-22 22:22:10 +0000 |
commit | 673788a5e02b9313e2b4fe809396619f92fb227e (patch) | |
tree | bf8928f76121d9b37161d8ca315c848c9ab1e883 | |
parent | ba8012ea5461a1581be7c79bbdd7b1f1d2bbeb4e (diff) | |
download | chromium_src-673788a5e02b9313e2b4fe809396619f92fb227e.zip chromium_src-673788a5e02b9313e2b4fe809396619f92fb227e.tar.gz chromium_src-673788a5e02b9313e2b4fe809396619f92fb227e.tar.bz2 |
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
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158192 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | cc/CCDelegatedRendererLayerImplTest.cpp | 2 | ||||
-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/CCSingleThreadProxy.cpp | 4 | ||||
-rw-r--r-- | cc/CCTextureUpdateControllerTest.cpp | 2 | ||||
-rw-r--r-- | cc/CCThreadProxy.cpp | 11 | ||||
-rw-r--r-- | cc/TiledLayerChromiumTest.cpp | 2 |
14 files changed, 51 insertions, 63 deletions
diff --git a/cc/CCDelegatedRendererLayerImplTest.cpp b/cc/CCDelegatedRendererLayerImplTest.cpp index e5fcdc8..71e1a0e 100644 --- a/cc/CCDelegatedRendererLayerImplTest.cpp +++ b/cc/CCDelegatedRendererLayerImplTest.cpp @@ -38,7 +38,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)); } diff --git a/cc/CCLayerTreeHostImpl.cpp b/cc/CCLayerTreeHostImpl.cpp index 35ade76..4cb3db0 100644 --- a/cc/CCLayerTreeHostImpl.cpp +++ b/cc/CCLayerTreeHostImpl.cpp @@ -709,7 +709,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; @@ -722,7 +722,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 08f6028..015281a 100644 --- a/cc/CCLayerTreeHostImpl.h +++ b/cc/CCLayerTreeHostImpl.h @@ -114,7 +114,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 8d4971f..8529a07 100644 --- a/cc/CCLayerTreeHostImplTest.cpp +++ b/cc/CCLayerTreeHostImplTest.cpp @@ -61,7 +61,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)); } @@ -83,7 +83,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; @@ -154,7 +154,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); @@ -321,7 +321,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)); @@ -1677,7 +1677,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); @@ -1788,7 +1788,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)); @@ -1837,7 +1837,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); @@ -2124,7 +2124,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)); /* @@ -2263,7 +2263,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()); @@ -2276,7 +2276,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(); } @@ -2602,7 +2602,7 @@ TEST_F(CCLayerTreeHostImplTest, dontUseOldResourcesAfterLostContext) rootLayer->addChild(delegatedRendererLayer.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()); @@ -2618,7 +2618,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. @@ -2731,7 +2731,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()); @@ -2803,7 +2803,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); @@ -2849,7 +2849,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); @@ -2961,7 +2961,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); @@ -3074,7 +3074,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); @@ -3188,7 +3188,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); @@ -3271,7 +3271,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); @@ -3356,7 +3356,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); @@ -3474,7 +3474,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())); @@ -4221,7 +4221,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 296a5bb..d3596da 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 fcd7cc5..1cc5a29 100644 --- a/cc/CCResourceProvider.cpp +++ b/cc/CCResourceProvider.cpp @@ -107,10 +107,10 @@ CCResourceProvider::Child::~Child() { } -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(); } @@ -447,7 +447,7 @@ CCResourceProvider::CCResourceProvider(CCGraphicsContext* context) { } -bool CCResourceProvider::initialize(TextureUploaderOption textureUploaderOption) +bool CCResourceProvider::initialize() { ASSERT(CCProxy::isImplThread()); WebGraphicsContext3D* context3d = m_context->context3D(); @@ -482,10 +482,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 8ccfbd7..9aa9c85 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; @@ -64,7 +62,7 @@ public: unsigned syncPoint; }; - static PassOwnPtr<CCResourceProvider> create(CCGraphicsContext*, TextureUploaderOption); + static PassOwnPtr<CCResourceProvider> create(CCGraphicsContext*); virtual ~CCResourceProvider(); @@ -238,7 +236,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/CCSingleThreadProxy.cpp b/cc/CCSingleThreadProxy.cpp index 89129d5..4b28c7d 100644 --- a/cc/CCSingleThreadProxy.cpp +++ b/cc/CCSingleThreadProxy.cpp @@ -112,7 +112,7 @@ bool CCSingleThreadProxy::initializeRenderer() ASSERT(m_contextBeforeInitialization); { DebugScopedSetImplThread impl; - bool ok = m_layerTreeHostImpl->initializeRenderer(m_contextBeforeInitialization.release(), UnthrottledUploader); + bool ok = m_layerTreeHostImpl->initializeRenderer(m_contextBeforeInitialization.release()); if (ok) { m_rendererInitialized = true; m_RendererCapabilitiesForMainThread = m_layerTreeHostImpl->rendererCapabilities(); @@ -138,7 +138,7 @@ bool CCSingleThreadProxy::recreateContext() DebugScopedSetImplThread impl; if (!m_layerTreeHostImpl->contentsTexturesPurged()) m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->resourceProvider()); - initialized = m_layerTreeHostImpl->initializeRenderer(context.release(), UnthrottledUploader); + initialized = m_layerTreeHostImpl->initializeRenderer(context.release()); if (initialized) { m_RendererCapabilitiesForMainThread = m_layerTreeHostImpl->rendererCapabilities(); } diff --git a/cc/CCTextureUpdateControllerTest.cpp b/cc/CCTextureUpdateControllerTest.cpp index b52510b..2d2aec5 100644 --- a/cc/CCTextureUpdateControllerTest.cpp +++ b/cc/CCTextureUpdateControllerTest.cpp @@ -162,7 +162,7 @@ protected: { m_context = FakeWebCompositorOutputSurface::create(adoptPtr(new WebGraphicsContext3DForUploadTest(this))); DebugScopedSetImplThread implThread; - m_resourceProvider = CCResourceProvider::create(m_context.get(), UnthrottledUploader); + m_resourceProvider = CCResourceProvider::create(m_context.get()); } diff --git a/cc/CCThreadProxy.cpp b/cc/CCThreadProxy.cpp index 0c92fe7..579870f 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)); @@ -884,7 +877,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( @@ -921,7 +914,7 @@ void CCThreadProxy::recreateContextOnImplThread(CCCompletionEvent* completion, C TRACE_EVENT0("cc", "CCThreadProxy::recreateContextOnImplThread"); ASSERT(isImplThread()); 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(); diff --git a/cc/TiledLayerChromiumTest.cpp b/cc/TiledLayerChromiumTest.cpp index cc0c96a..5b90e2e 100644 --- a/cc/TiledLayerChromiumTest.cpp +++ b/cc/TiledLayerChromiumTest.cpp @@ -57,7 +57,7 @@ public: , m_occlusion(0) { DebugScopedSetImplThreadAndMainThreadBlocked implThreadAndMainThreadBlocked; - m_resourceProvider = CCResourceProvider::create(m_context.get(), UnthrottledUploader); + m_resourceProvider = CCResourceProvider::create(m_context.get()); } virtual ~TiledLayerChromiumTest() |