Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: cc/CCThreadProxy.cpp

Issue 11031060: Revert 160267 - Merge 158192 - cc: Remove TextureUploaderOption. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/CCScopedTextureTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "CCThreadProxy.h" 7 #include "CCThreadProxy.h"
8 8
9 #include "CCDelayBasedTimeSource.h" 9 #include "CCDelayBasedTimeSource.h"
10 #include "CCDrawQuad.h" 10 #include "CCDrawQuad.h"
(...skipping 13 matching lines...) Expand all
24 using WebKit::WebSharedGraphicsContext3D; 24 using WebKit::WebSharedGraphicsContext3D;
25 namespace { 25 namespace {
26 26
27 // Measured in seconds. 27 // Measured in seconds.
28 static const double contextRecreationTickRate = 0.03; 28 static const double contextRecreationTickRate = 0.03;
29 29
30 } // anonymous namespace 30 } // anonymous namespace
31 31
32 namespace cc { 32 namespace cc {
33 33
34 namespace {
35
36 // Type of texture uploader to use for texture updates.
37 static TextureUploaderOption textureUploader = ThrottledUploader;
38
39 } // anonymous namespace
40
34 PassOwnPtr<CCProxy> CCThreadProxy::create(CCLayerTreeHost* layerTreeHost) 41 PassOwnPtr<CCProxy> CCThreadProxy::create(CCLayerTreeHost* layerTreeHost)
35 { 42 {
36 return adoptPtr(new CCThreadProxy(layerTreeHost)); 43 return adoptPtr(new CCThreadProxy(layerTreeHost));
37 } 44 }
38 45
39 CCThreadProxy::CCThreadProxy(CCLayerTreeHost* layerTreeHost) 46 CCThreadProxy::CCThreadProxy(CCLayerTreeHost* layerTreeHost)
40 : m_animateRequested(false) 47 : m_animateRequested(false)
41 , m_commitRequested(false) 48 , m_commitRequested(false)
42 , m_commitRequestSentToImplThread(false) 49 , m_commitRequestSentToImplThread(false)
43 , m_forcedCommitRequested(false) 50 , m_forcedCommitRequested(false)
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 TRACE_EVENT0("cc", "CCThreadProxy::initializeContextOnImplThread"); 866 TRACE_EVENT0("cc", "CCThreadProxy::initializeContextOnImplThread");
860 ASSERT(isImplThread()); 867 ASSERT(isImplThread());
861 m_contextBeforeInitializationOnImplThread = adoptPtr(context); 868 m_contextBeforeInitializationOnImplThread = adoptPtr(context);
862 } 869 }
863 870
864 void CCThreadProxy::initializeRendererOnImplThread(CCCompletionEvent* completion , bool* initializeSucceeded, RendererCapabilities* capabilities) 871 void CCThreadProxy::initializeRendererOnImplThread(CCCompletionEvent* completion , bool* initializeSucceeded, RendererCapabilities* capabilities)
865 { 872 {
866 TRACE_EVENT0("cc", "CCThreadProxy::initializeRendererOnImplThread"); 873 TRACE_EVENT0("cc", "CCThreadProxy::initializeRendererOnImplThread");
867 ASSERT(isImplThread()); 874 ASSERT(isImplThread());
868 ASSERT(m_contextBeforeInitializationOnImplThread); 875 ASSERT(m_contextBeforeInitializationOnImplThread);
869 *initializeSucceeded = m_layerTreeHostImpl->initializeRenderer(m_contextBefo reInitializationOnImplThread.release()); 876 *initializeSucceeded = m_layerTreeHostImpl->initializeRenderer(m_contextBefo reInitializationOnImplThread.release(), textureUploader);
870 if (*initializeSucceeded) { 877 if (*initializeSucceeded) {
871 *capabilities = m_layerTreeHostImpl->rendererCapabilities(); 878 *capabilities = m_layerTreeHostImpl->rendererCapabilities();
872 m_schedulerOnImplThread->setSwapBuffersCompleteSupported( 879 m_schedulerOnImplThread->setSwapBuffersCompleteSupported(
873 capabilities->usingSwapCompleteCallback); 880 capabilities->usingSwapCompleteCallback);
874 } 881 }
875 882
876 completion->signal(); 883 completion->signal();
877 } 884 }
878 885
879 void CCThreadProxy::layerTreeHostClosedOnImplThread(CCCompletionEvent* completio n) 886 void CCThreadProxy::layerTreeHostClosedOnImplThread(CCCompletionEvent* completio n)
(...skipping 18 matching lines...) Expand all
898 { 905 {
899 return CCTextureUpdateController::maxPartialTextureUpdates(); 906 return CCTextureUpdateController::maxPartialTextureUpdates();
900 } 907 }
901 908
902 void CCThreadProxy::recreateContextOnImplThread(CCCompletionEvent* completion, C CGraphicsContext* contextPtr, bool* recreateSucceeded, RendererCapabilities* cap abilities) 909 void CCThreadProxy::recreateContextOnImplThread(CCCompletionEvent* completion, C CGraphicsContext* contextPtr, bool* recreateSucceeded, RendererCapabilities* cap abilities)
903 { 910 {
904 TRACE_EVENT0("cc", "CCThreadProxy::recreateContextOnImplThread"); 911 TRACE_EVENT0("cc", "CCThreadProxy::recreateContextOnImplThread");
905 ASSERT(isImplThread()); 912 ASSERT(isImplThread());
906 if (!m_layerTreeHostImpl->contentsTexturesPurged()) 913 if (!m_layerTreeHostImpl->contentsTexturesPurged())
907 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl- >resourceProvider()); 914 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl- >resourceProvider());
908 *recreateSucceeded = m_layerTreeHostImpl->initializeRenderer(adoptPtr(contex tPtr)); 915 *recreateSucceeded = m_layerTreeHostImpl->initializeRenderer(adoptPtr(contex tPtr), textureUploader);
909 if (*recreateSucceeded) { 916 if (*recreateSucceeded) {
910 *capabilities = m_layerTreeHostImpl->rendererCapabilities(); 917 *capabilities = m_layerTreeHostImpl->rendererCapabilities();
911 m_schedulerOnImplThread->didRecreateContext(); 918 m_schedulerOnImplThread->didRecreateContext();
912 } 919 }
913 completion->signal(); 920 completion->signal();
914 } 921 }
915 922
916 void CCThreadProxy::implSideRenderingStatsOnImplThread(CCCompletionEvent* comple tion, CCRenderingStats* stats) 923 void CCThreadProxy::implSideRenderingStatsOnImplThread(CCCompletionEvent* comple tion, CCRenderingStats* stats)
917 { 924 {
918 ASSERT(isImplThread()); 925 ASSERT(isImplThread());
919 m_layerTreeHostImpl->renderingStats(*stats); 926 m_layerTreeHostImpl->renderingStats(*stats);
920 completion->signal(); 927 completion->signal();
921 } 928 }
922 929
923 } // namespace cc 930 } // namespace cc
OLDNEW
« no previous file with comments | « cc/CCScopedTextureTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698