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

Side by Side Diff: content/common/gpu/client/command_buffer_proxy.cc

Issue 9581034: Disable the transfer_buffer_ cache by forcing it to be empty; work around (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 #include "content/common/gpu/client/command_buffer_proxy.h" 5 #include "content/common/gpu/client/command_buffer_proxy.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 if (!shared_memory->Map(size)) { 302 if (!shared_memory->Map(size)) {
303 delete shared_memory; 303 delete shared_memory;
304 return Buffer(); 304 return Buffer();
305 } 305 }
306 } 306 }
307 307
308 Buffer buffer; 308 Buffer buffer;
309 buffer.ptr = shared_memory->memory(); 309 buffer.ptr = shared_memory->memory();
310 buffer.size = size; 310 buffer.size = size;
311 buffer.shared_memory = shared_memory; 311 buffer.shared_memory = shared_memory;
312 // todo(apatrick,nfullagar): re-enable when cache sync issues are solved.
313 // see: http://code.google.com/p/chromium/issues/detail?id=116285
314 #define DISABLE_TRANSFER_BUFFER_CACHE
315 #ifndef DISABLE_TRANSFER_BUFFER_CACHE
312 transfer_buffers_[id] = buffer; 316 transfer_buffers_[id] = buffer;
piman 2012/03/05 22:55:13 How is the SharedMemory ever destroyed and unmappe
apatrick_chromium 2012/03/05 23:00:38 Good point. Now the shared memory handles won't ge
317 #endif
313 318
314 return buffer; 319 return buffer;
315 } 320 }
316 321
317 void CommandBufferProxy::SetToken(int32 token) { 322 void CommandBufferProxy::SetToken(int32 token) {
318 // Not implemented in proxy. 323 // Not implemented in proxy.
319 NOTREACHED(); 324 NOTREACHED();
320 } 325 }
321 326
322 void CommandBufferProxy::OnNotifyRepaint() { 327 void CommandBufferProxy::OnNotifyRepaint() {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 452
448 void CommandBufferProxy::SetOnConsoleMessageCallback( 453 void CommandBufferProxy::SetOnConsoleMessageCallback(
449 const GpuConsoleMessageCallback& callback) { 454 const GpuConsoleMessageCallback& callback) {
450 console_message_callback_ = callback; 455 console_message_callback_ = callback;
451 } 456 }
452 457
453 void CommandBufferProxy::TryUpdateState() { 458 void CommandBufferProxy::TryUpdateState() {
454 if (last_state_.error == gpu::error::kNoError) 459 if (last_state_.error == gpu::error::kNoError)
455 shared_state_->Read(&last_state_); 460 shared_state_->Read(&last_state_);
456 } 461 }
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