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 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 void PbufferImageTransportSurface::SendBuffersSwapped() { | 192 void PbufferImageTransportSurface::SendBuffersSwapped() { |
193 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params; | 193 GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params; |
194 params.surface_handle = reinterpret_cast<int64>(GetShareHandle()); | 194 params.surface_handle = reinterpret_cast<int64>(GetShareHandle()); |
195 CHECK(params.surface_handle); | 195 CHECK(params.surface_handle); |
196 | 196 |
197 params.size = GetSize(); | 197 params.size = GetSize(); |
198 helper_->SendAcceleratedSurfaceBuffersSwapped(params); | 198 helper_->SendAcceleratedSurfaceBuffersSwapped(params); |
199 | 199 |
200 DCHECK(!is_swap_buffers_pending_); | 200 DCHECK(!is_swap_buffers_pending_); |
201 is_swap_buffers_pending_ = true; | 201 is_swap_buffers_pending_ = true; |
| 202 |
| 203 // Pause all processing of this command buffer. |
| 204 // http://code.google.com/p/chromium/issues/detail?id=135546 |
| 205 DeferDraws(); |
202 } | 206 } |
203 | 207 |
204 void PbufferImageTransportSurface::OnBufferPresented(uint32 sync_point) { | 208 void PbufferImageTransportSurface::OnBufferPresented(uint32 sync_point) { |
205 is_swap_buffers_pending_ = false; | 209 is_swap_buffers_pending_ = false; |
206 if (did_unschedule_) { | 210 if (did_unschedule_) { |
207 did_unschedule_ = false; | 211 did_unschedule_ = false; |
208 helper_->SetScheduled(true); | 212 helper_->SetScheduled(true); |
209 } | 213 } |
210 } | 214 } |
211 | 215 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 handle.transport); | 263 handle.transport); |
260 } | 264 } |
261 | 265 |
262 if (surface->Initialize()) | 266 if (surface->Initialize()) |
263 return surface; | 267 return surface; |
264 else | 268 else |
265 return NULL; | 269 return NULL; |
266 } | 270 } |
267 | 271 |
268 #endif // ENABLE_GPU | 272 #endif // ENABLE_GPU |
OLD | NEW |