OLD | NEW |
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 18 matching lines...) Expand all Loading... |
29 #include "gpu/command_buffer/client/gles2_implementation.h" | 29 #include "gpu/command_buffer/client/gles2_implementation.h" |
30 #include "gpu/command_buffer/client/gles2_trace_implementation.h" | 30 #include "gpu/command_buffer/client/gles2_trace_implementation.h" |
31 #include "gpu/command_buffer/client/gpu_switches.h" | 31 #include "gpu/command_buffer/client/gpu_switches.h" |
32 #include "gpu/command_buffer/client/transfer_buffer.h" | 32 #include "gpu/command_buffer/client/transfer_buffer.h" |
33 #include "gpu/command_buffer/common/constants.h" | 33 #include "gpu/command_buffer/common/constants.h" |
34 #include "gpu/command_buffer/common/gpu_memory_allocation.h" | 34 #include "gpu/command_buffer/common/gpu_memory_allocation.h" |
35 #include "gpu/command_buffer/common/mailbox.h" | 35 #include "gpu/command_buffer/common/mailbox.h" |
36 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" | 36 #include "gpu/skia_bindings/gl_bindings_skia_cmd_buffer.h" |
37 #include "third_party/skia/include/core/SkTypes.h" | 37 #include "third_party/skia/include/core/SkTypes.h" |
38 | 38 |
39 using blink::WGC3Denum; | |
40 | |
41 namespace content { | 39 namespace content { |
42 | 40 |
43 namespace { | 41 namespace { |
44 | 42 |
45 static base::LazyInstance<base::Lock>::Leaky | 43 static base::LazyInstance<base::Lock>::Leaky |
46 g_default_share_groups_lock = LAZY_INSTANCE_INITIALIZER; | 44 g_default_share_groups_lock = LAZY_INSTANCE_INITIALIZER; |
47 | 45 |
48 typedef std::map<GpuChannelHost*, | 46 typedef std::map<GpuChannelHost*, |
49 scoped_refptr<WebGraphicsContext3DCommandBufferImpl::ShareGroup> > | 47 scoped_refptr<WebGraphicsContext3DCommandBufferImpl::ShareGroup> > |
50 ShareGroupMap; | 48 ShareGroupMap; |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 { | 354 { |
357 base::AutoLock lock(g_default_share_groups_lock.Get()); | 355 base::AutoLock lock(g_default_share_groups_lock.Get()); |
358 g_default_share_groups.Get().erase(host_.get()); | 356 g_default_share_groups.Get().erase(host_.get()); |
359 } | 357 } |
360 | 358 |
361 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); | 359 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); |
362 UmaRecordContextLost(context_type_, state.error, state.context_lost_reason); | 360 UmaRecordContextLost(context_type_, state.error, state.context_lost_reason); |
363 } | 361 } |
364 | 362 |
365 } // namespace content | 363 } // namespace content |
OLD | NEW |