| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |