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

Side by Side Diff: content/common/gpu/image_transport_surface_win.cc

Issue 10828100: Revert 149038 - Don't allow processing of a command buffer to overlap with a previous swap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 (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
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();
206 } 202 }
207 203
208 void PbufferImageTransportSurface::OnBufferPresented(uint32 sync_point) { 204 void PbufferImageTransportSurface::OnBufferPresented(uint32 sync_point) {
209 is_swap_buffers_pending_ = false; 205 is_swap_buffers_pending_ = false;
210 if (did_unschedule_) { 206 if (did_unschedule_) {
211 did_unschedule_ = false; 207 did_unschedule_ = false;
212 helper_->SetScheduled(true); 208 helper_->SetScheduled(true);
213 } 209 }
214 } 210 }
215 211
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 handle.transport); 259 handle.transport);
264 } 260 }
265 261
266 if (surface->Initialize()) 262 if (surface->Initialize())
267 return surface; 263 return surface;
268 else 264 else
269 return NULL; 265 return NULL;
270 } 266 }
271 267
272 #endif // ENABLE_GPU 268 #endif // ENABLE_GPU
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