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

Side by Side Diff: cc/CCSingleThreadProxy.cpp

Issue 10961008: cc: Remove TextureUploaderOption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Settle for removing TextureUploaderOption in this CL. I'll figure out what to do with the uploader … Created 8 years, 3 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') | cc/CCTextureUpdateControllerTest.cpp » ('j') | 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 "CCSingleThreadProxy.h" 7 #include "CCSingleThreadProxy.h"
8 8
9 #include "CCDrawQuad.h" 9 #include "CCDrawQuad.h"
10 #include "CCGraphicsContext.h" 10 #include "CCGraphicsContext.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 DebugScopedSetImplThread impl; 105 DebugScopedSetImplThread impl;
106 m_layerTreeHostImpl->setVisible(visible); 106 m_layerTreeHostImpl->setVisible(visible);
107 } 107 }
108 108
109 bool CCSingleThreadProxy::initializeRenderer() 109 bool CCSingleThreadProxy::initializeRenderer()
110 { 110 {
111 ASSERT(CCProxy::isMainThread()); 111 ASSERT(CCProxy::isMainThread());
112 ASSERT(m_contextBeforeInitialization); 112 ASSERT(m_contextBeforeInitialization);
113 { 113 {
114 DebugScopedSetImplThread impl; 114 DebugScopedSetImplThread impl;
115 bool ok = m_layerTreeHostImpl->initializeRenderer(m_contextBeforeInitial ization.release(), UnthrottledUploader); 115 bool ok = m_layerTreeHostImpl->initializeRenderer(m_contextBeforeInitial ization.release());
116 if (ok) { 116 if (ok) {
117 m_rendererInitialized = true; 117 m_rendererInitialized = true;
118 m_RendererCapabilitiesForMainThread = m_layerTreeHostImpl->rendererC apabilities(); 118 m_RendererCapabilitiesForMainThread = m_layerTreeHostImpl->rendererC apabilities();
119 } 119 }
120 120
121 return ok; 121 return ok;
122 } 122 }
123 } 123 }
124 124
125 bool CCSingleThreadProxy::recreateContext() 125 bool CCSingleThreadProxy::recreateContext()
126 { 126 {
127 TRACE_EVENT0("cc", "CCSingleThreadProxy::recreateContext"); 127 TRACE_EVENT0("cc", "CCSingleThreadProxy::recreateContext");
128 ASSERT(CCProxy::isMainThread()); 128 ASSERT(CCProxy::isMainThread());
129 ASSERT(m_contextLost); 129 ASSERT(m_contextLost);
130 130
131 OwnPtr<CCGraphicsContext> context = m_layerTreeHost->createContext(); 131 OwnPtr<CCGraphicsContext> context = m_layerTreeHost->createContext();
132 if (!context) 132 if (!context)
133 return false; 133 return false;
134 134
135 bool initialized; 135 bool initialized;
136 { 136 {
137 DebugScopedSetMainThreadBlocked mainThreadBlocked; 137 DebugScopedSetMainThreadBlocked mainThreadBlocked;
138 DebugScopedSetImplThread impl; 138 DebugScopedSetImplThread impl;
139 if (!m_layerTreeHostImpl->contentsTexturesPurged()) 139 if (!m_layerTreeHostImpl->contentsTexturesPurged())
140 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostI mpl->resourceProvider()); 140 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostI mpl->resourceProvider());
141 initialized = m_layerTreeHostImpl->initializeRenderer(context.release(), UnthrottledUploader); 141 initialized = m_layerTreeHostImpl->initializeRenderer(context.release()) ;
142 if (initialized) { 142 if (initialized) {
143 m_RendererCapabilitiesForMainThread = m_layerTreeHostImpl->rendererC apabilities(); 143 m_RendererCapabilitiesForMainThread = m_layerTreeHostImpl->rendererC apabilities();
144 } 144 }
145 } 145 }
146 146
147 if (initialized) 147 if (initialized)
148 m_contextLost = false; 148 m_contextLost = false;
149 149
150 return initialized; 150 return initialized;
151 } 151 }
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 368
369 void CCSingleThreadProxy::didSwapFrame() 369 void CCSingleThreadProxy::didSwapFrame()
370 { 370 {
371 if (m_nextFrameIsNewlyCommittedFrame) { 371 if (m_nextFrameIsNewlyCommittedFrame) {
372 m_nextFrameIsNewlyCommittedFrame = false; 372 m_nextFrameIsNewlyCommittedFrame = false;
373 m_layerTreeHost->didCommitAndDrawFrame(); 373 m_layerTreeHost->didCommitAndDrawFrame();
374 } 374 }
375 } 375 }
376 376
377 } 377 }
OLDNEW
« no previous file with comments | « cc/CCScopedTextureTest.cpp ('k') | cc/CCTextureUpdateControllerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698