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

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: Fixed Windows Build. Thanks girard@! 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
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.cc ('k') | content/content_common.gypi » ('j') | 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/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_cmd_helper.h" 28 #include "gpu/command_buffer/client/gles2_cmd_helper.h"
30 #include "gpu/command_buffer/client/gles2_implementation.h" 29 #include "gpu/command_buffer/client/gles2_implementation.h"
31 #include "gpu/command_buffer/client/gles2_lib.h" 30 #include "gpu/command_buffer/client/gles2_lib.h"
32 #include "gpu/command_buffer/client/transfer_buffer.h" 31 #include "gpu/command_buffer/client/transfer_buffer.h"
33 #include "gpu/command_buffer/common/constants.h" 32 #include "gpu/command_buffer/common/constants.h"
33 #include "gpu/ipc/command_buffer_proxy.h"
34 #include "webkit/glue/gl_bindings_skia_cmd_buffer.h" 34 #include "webkit/glue/gl_bindings_skia_cmd_buffer.h"
35 35
36 static base::LazyInstance<base::Lock>::Leaky 36 static base::LazyInstance<base::Lock>::Leaky
37 g_all_shared_contexts_lock = LAZY_INSTANCE_INITIALIZER; 37 g_all_shared_contexts_lock = LAZY_INSTANCE_INITIALIZER;
38 static base::LazyInstance<std::set<WebGraphicsContext3DCommandBufferImpl*> > 38 static base::LazyInstance<std::set<WebGraphicsContext3DCommandBufferImpl*> >
39 g_all_shared_contexts = LAZY_INSTANCE_INITIALIZER; 39 g_all_shared_contexts = LAZY_INSTANCE_INITIALIZER;
40 40
41 namespace { 41 namespace {
42 42
43 void ClearSharedContexts() { 43 void ClearSharedContexts() {
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1495 } 1495 }
1496 1496
1497 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1497 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1498 const std::string& message, int id) { 1498 const std::string& message, int id) {
1499 if (error_message_callback_) { 1499 if (error_message_callback_) {
1500 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1500 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1501 error_message_callback_->onErrorMessage(str, id); 1501 error_message_callback_->onErrorMessage(str, id);
1502 } 1502 }
1503 } 1503 }
1504 1504
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.cc ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698