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. | |
jbates
2012/07/27 21:39:57
better put the bug number here just in case it sit
| |
204 DeferDraws(); | |
202 } | 205 } |
203 | 206 |
204 void PbufferImageTransportSurface::OnBufferPresented(uint32 sync_point) { | 207 void PbufferImageTransportSurface::OnBufferPresented(uint32 sync_point) { |
205 is_swap_buffers_pending_ = false; | 208 is_swap_buffers_pending_ = false; |
206 if (did_unschedule_) { | 209 if (did_unschedule_) { |
207 did_unschedule_ = false; | 210 did_unschedule_ = false; |
208 helper_->SetScheduled(true); | 211 helper_->SetScheduled(true); |
209 } | 212 } |
210 } | 213 } |
211 | 214 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
259 handle.transport); | 262 handle.transport); |
260 } | 263 } |
261 | 264 |
262 if (surface->Initialize()) | 265 if (surface->Initialize()) |
263 return surface; | 266 return surface; |
264 else | 267 else |
265 return NULL; | 268 return NULL; |
266 } | 269 } |
267 | 270 |
268 #endif // ENABLE_GPU | 271 #endif // ENABLE_GPU |
OLD | NEW |