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

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

Issue 9702081: Splitting GpuMemoryAllocation into two parts: for renderer and browser (Closed) Base URL: svn://svn.chromium.org/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
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/webgraphicscontext3d_command_buffer_impl.h" 5 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
6 6
7 #include "third_party/khronos/GLES2/gl2.h" 7 #include "third_party/khronos/GLES2/gl2.h"
8 #ifndef GL_GLEXT_PROTOTYPES 8 #ifndef GL_GLEXT_PROTOTYPES
9 #define GL_GLEXT_PROTOTYPES 1 9 #define GL_GLEXT_PROTOTYPES 1
10 #endif 10 #endif
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 if (ShouldUseSwapClient()) { 1141 if (ShouldUseSwapClient()) {
1142 MessageLoop::current()->PostTask(FROM_HERE, base::Bind( 1142 MessageLoop::current()->PostTask(FROM_HERE, base::Bind(
1143 &WGC3DSwapClient::OnViewContextSwapBuffersComplete, swap_client_)); 1143 &WGC3DSwapClient::OnViewContextSwapBuffersComplete, swap_client_));
1144 } 1144 }
1145 1145
1146 if (swapbuffers_complete_callback_) 1146 if (swapbuffers_complete_callback_)
1147 swapbuffers_complete_callback_->onSwapBuffersComplete(); 1147 swapbuffers_complete_callback_->onSwapBuffersComplete();
1148 } 1148 }
1149 1149
1150 void WebGraphicsContext3DCommandBufferImpl::OnMemoryAllocationChanged( 1150 void WebGraphicsContext3DCommandBufferImpl::OnMemoryAllocationChanged(
1151 const GpuMemoryAllocation& allocation) { 1151 const GpuMemoryAllocationForRenderer& allocation) {
1152 if (memory_allocation_changed_callback_) 1152 if (memory_allocation_changed_callback_)
1153 memory_allocation_changed_callback_->onMemoryAllocationChanged( 1153 memory_allocation_changed_callback_->onMemoryAllocationChanged(
1154 allocation.gpu_resource_size_in_bytes); 1154 allocation.gpu_resource_size_in_bytes);
1155 } 1155 }
1156 1156
1157 void WebGraphicsContext3DCommandBufferImpl::setErrorMessageCallback( 1157 void WebGraphicsContext3DCommandBufferImpl::setErrorMessageCallback(
1158 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* cb) { 1158 WebGraphicsContext3D::WebGraphicsErrorMessageCallback* cb) {
1159 error_message_callback_ = cb; 1159 error_message_callback_ = cb;
1160 } 1160 }
1161 1161
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 } 1240 }
1241 1241
1242 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1242 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1243 const std::string& message, int id) { 1243 const std::string& message, int id) {
1244 if (error_message_callback_) { 1244 if (error_message_callback_) {
1245 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1245 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1246 error_message_callback_->onErrorMessage(str, id); 1246 error_message_callback_->onErrorMessage(str, id);
1247 } 1247 }
1248 } 1248 }
1249 1249
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698