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

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

Issue 9904005: PpapiCommandBufferProxy implements CommandBufferProxy. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed obsolete ENABLE_GPU def from CommandBufferProxy Created 8 years, 8 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
11 #include "third_party/khronos/GLES2/gl2ext.h" 11 #include "third_party/khronos/GLES2/gl2ext.h"
12 12
13 #include <algorithm> 13 #include <algorithm>
14 #include <set> 14 #include <set>
15 15
16 #include "base/bind.h" 16 #include "base/bind.h"
17 #include "base/lazy_instance.h" 17 #include "base/lazy_instance.h"
18 #include "base/string_tokenizer.h" 18 #include "base/string_tokenizer.h"
19 #include "base/command_line.h" 19 #include "base/command_line.h"
20 #include "base/debug/trace_event.h" 20 #include "base/debug/trace_event.h"
21 #include "base/logging.h" 21 #include "base/logging.h"
22 #include "base/message_loop.h" 22 #include "base/message_loop.h"
23 #include "base/metrics/histogram.h" 23 #include "base/metrics/histogram.h"
24 #include "base/synchronization/lock.h" 24 #include "base/synchronization/lock.h"
25 #include "content/common/gpu/gpu_memory_allocation.h" 25 #include "content/common/gpu/gpu_memory_allocation.h"
26 #include "content/common/gpu/client/command_buffer_proxy.h"
27 #include "content/common/gpu/client/gpu_channel_host.h" 26 #include "content/common/gpu/client/gpu_channel_host.h"
28 #include "content/public/common/content_switches.h" 27 #include "content/public/common/content_switches.h"
29 #include "gpu/command_buffer/client/gles2_implementation.h" 28 #include "gpu/command_buffer/client/gles2_implementation.h"
30 #include "gpu/command_buffer/common/constants.h" 29 #include "gpu/command_buffer/common/constants.h"
30 #include "gpu/ipc/command_buffer_proxy.h"
31 #include "webkit/glue/gl_bindings_skia_cmd_buffer.h" 31 #include "webkit/glue/gl_bindings_skia_cmd_buffer.h"
32 32
33 static base::LazyInstance<base::Lock>::Leaky 33 static base::LazyInstance<base::Lock>::Leaky
34 g_all_shared_contexts_lock = LAZY_INSTANCE_INITIALIZER; 34 g_all_shared_contexts_lock = LAZY_INSTANCE_INITIALIZER;
35 static base::LazyInstance<std::set<WebGraphicsContext3DCommandBufferImpl*> > 35 static base::LazyInstance<std::set<WebGraphicsContext3DCommandBufferImpl*> >
36 g_all_shared_contexts = LAZY_INSTANCE_INITIALIZER; 36 g_all_shared_contexts = LAZY_INSTANCE_INITIALIZER;
37 37
38 namespace { 38 namespace {
39 39
40 void ClearSharedContexts() { 40 void ClearSharedContexts() {
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 } 1263 }
1264 1264
1265 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1265 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1266 const std::string& message, int id) { 1266 const std::string& message, int id) {
1267 if (error_message_callback_) { 1267 if (error_message_callback_) {
1268 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1268 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1269 error_message_callback_->onErrorMessage(str, id); 1269 error_message_callback_->onErrorMessage(str, id);
1270 } 1270 }
1271 } 1271 }
1272 1272
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698