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

Side by Side Diff: cc/delegating_renderer.cc

Issue 12381042: cc: Only call didCompleteSwapBuffers() when in threaded mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | « no previous file | 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "cc/delegating_renderer.h" 5 #include "cc/delegating_renderer.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 170 }
171 171
172 void DelegatingRenderer::getFramebufferPixels(void *pixels, 172 void DelegatingRenderer::getFramebufferPixels(void *pixels,
173 const gfx::Rect& rect) { 173 const gfx::Rect& rect) {
174 NOTIMPLEMENTED(); 174 NOTIMPLEMENTED();
175 } 175 }
176 176
177 void DelegatingRenderer::receiveCompositorFrameAck( 177 void DelegatingRenderer::receiveCompositorFrameAck(
178 const CompositorFrameAck& ack) { 178 const CompositorFrameAck& ack) {
179 resource_provider_->receiveFromParent(ack.resources); 179 resource_provider_->receiveFromParent(ack.resources);
180 m_client->onSwapBuffersComplete(); 180 if (m_client->hasImplThread())
181 m_client->onSwapBuffersComplete();
181 } 182 }
182 183
183 184
184 bool DelegatingRenderer::isContextLost() { 185 bool DelegatingRenderer::isContextLost() {
185 WebGraphicsContext3D* context3d = resource_provider_->graphicsContext3D(); 186 WebGraphicsContext3D* context3d = resource_provider_->graphicsContext3D();
186 if (!context3d) 187 if (!context3d)
187 return false; 188 return false;
188 return context3d->getGraphicsResetStatusARB() != GL_NO_ERROR; 189 return context3d->getGraphicsResetStatusARB() != GL_NO_ERROR;
189 } 190 }
190 191
191 void DelegatingRenderer::setVisible(bool visible) { 192 void DelegatingRenderer::setVisible(bool visible) {
192 visible_ = visible; 193 visible_ = visible;
193 } 194 }
194 195
195 void DelegatingRenderer::onContextLost() { 196 void DelegatingRenderer::onContextLost() {
196 m_client->didLoseOutputSurface(); 197 m_client->didLoseOutputSurface();
197 } 198 }
198 199
199 } // namespace cc 200 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698