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

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

Issue 9702081: Splitting GpuMemoryAllocation into two parts: for renderer and browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding unittests for GpuMemoryAllocation comparison functions since they have become not as trivial. 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
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 void CommandBufferProxy::OnConsoleMessage( 93 void CommandBufferProxy::OnConsoleMessage(
94 const GPUCommandBufferConsoleMessage& message) { 94 const GPUCommandBufferConsoleMessage& message) {
95 if (!console_message_callback_.is_null()) { 95 if (!console_message_callback_.is_null()) {
96 console_message_callback_.Run(message.message, message.id); 96 console_message_callback_.Run(message.message, message.id);
97 } 97 }
98 } 98 }
99 99
100 void CommandBufferProxy::SetMemoryAllocationChangedCallback( 100 void CommandBufferProxy::SetMemoryAllocationChangedCallback(
101 const base::Callback<void(const GpuMemoryAllocation&)>& callback) { 101 const base::Callback<void(const GpuMemoryAllocationForRenderer&)>&
102 callback) {
102 memory_allocation_changed_callback_ = callback; 103 memory_allocation_changed_callback_ = callback;
103 } 104 }
104 105
105 void CommandBufferProxy::OnSetMemoryAllocation( 106 void CommandBufferProxy::OnSetMemoryAllocation(
106 const GpuMemoryAllocation& allocation) { 107 const GpuMemoryAllocationForRenderer& allocation) {
107 if (!memory_allocation_changed_callback_.is_null()) 108 if (!memory_allocation_changed_callback_.is_null())
108 memory_allocation_changed_callback_.Run(allocation); 109 memory_allocation_changed_callback_.Run(allocation);
109 } 110 }
110 111
111 void CommandBufferProxy::SetChannelErrorCallback( 112 void CommandBufferProxy::SetChannelErrorCallback(
112 const base::Closure& callback) { 113 const base::Closure& callback) {
113 channel_error_callback_ = callback; 114 channel_error_callback_ = callback;
114 } 115 }
115 116
116 bool CommandBufferProxy::Initialize() { 117 bool CommandBufferProxy::Initialize() {
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 455
455 void CommandBufferProxy::SetOnConsoleMessageCallback( 456 void CommandBufferProxy::SetOnConsoleMessageCallback(
456 const GpuConsoleMessageCallback& callback) { 457 const GpuConsoleMessageCallback& callback) {
457 console_message_callback_ = callback; 458 console_message_callback_ = callback;
458 } 459 }
459 460
460 void CommandBufferProxy::TryUpdateState() { 461 void CommandBufferProxy::TryUpdateState() {
461 if (last_state_.error == gpu::error::kNoError) 462 if (last_state_.error == gpu::error::kNoError)
462 shared_state_->Read(&last_state_); 463 shared_state_->Read(&last_state_);
463 } 464 }
OLDNEW
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy.h ('k') | content/common/gpu/client/content_gl_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698