Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
| 6 | 6 |
| 7 #include "content/common/gpu/image_transport_surface.h" | 7 #include "content/common/gpu/image_transport_surface.h" |
| 8 | 8 |
| 9 // Out of order because it has conflicts with other includes on Windows. | 9 // Out of order because it has conflicts with other includes on Windows. |
| 10 #include "third_party/angle/include/EGL/egl.h" | 10 #include "third_party/angle/include/EGL/egl.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 void PbufferImageTransportSurface::Destroy() { | 111 void PbufferImageTransportSurface::Destroy() { |
| 112 helper_->Destroy(); | 112 helper_->Destroy(); |
| 113 GLSurfaceAdapter::Destroy(); | 113 GLSurfaceAdapter::Destroy(); |
| 114 } | 114 } |
| 115 | 115 |
| 116 bool PbufferImageTransportSurface::DeferDraws() { | 116 bool PbufferImageTransportSurface::DeferDraws() { |
| 117 // The command buffer hit a draw/clear command that could clobber the | 117 // The command buffer hit a draw/clear command that could clobber the |
| 118 // IOSurface in use by an earlier SwapBuffers. If a Swap is pending, abort | 118 // IOSurface in use by an earlier SwapBuffers. If a Swap is pending, abort |
| 119 // processing of the command by returning true and unschedule until the Swap | 119 // processing of the command by returning true and unschedule until the Swap |
| 120 // Ack arrives. | 120 // Ack arrives. |
| 121 DCHECK(!did_unschedule_); | |
|
jbates
2012/09/10 22:54:45
If this happens then we need to make a slight chan
Vitaly Buka (NO REVIEWS)
2012/09/10 22:59:51
Done.
| |
| 122 if (is_swap_buffers_pending_) { | 121 if (is_swap_buffers_pending_) { |
| 123 did_unschedule_ = true; | 122 did_unschedule_ = true; |
| 124 helper_->SetScheduled(false); | 123 helper_->SetScheduled(false); |
| 125 return true; | 124 return true; |
| 126 } | 125 } |
| 127 return false; | 126 return false; |
| 128 } | 127 } |
| 129 | 128 |
| 130 bool PbufferImageTransportSurface::IsOffscreen() { | 129 bool PbufferImageTransportSurface::IsOffscreen() { |
| 131 return false; | 130 return false; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 279 } | 278 } |
| 280 } | 279 } |
| 281 | 280 |
| 282 if (surface->Initialize()) | 281 if (surface->Initialize()) |
| 283 return surface; | 282 return surface; |
| 284 else | 283 else |
| 285 return NULL; | 284 return NULL; |
| 286 } | 285 } |
| 287 | 286 |
| 288 #endif // ENABLE_GPU | 287 #endif // ENABLE_GPU |
| OLD | NEW |