| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "webkit/common/gpu/grcontext_for_webgraphicscontext3d.h" | 5 #include "webkit/common/gpu/grcontext_for_webgraphicscontext3d.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "gpu/blink/webgraphicscontext3d_impl.h" |
| 9 #include "gpu/command_buffer/client/gles2_lib.h" | 10 #include "gpu/command_buffer/client/gles2_lib.h" |
| 10 #include "third_party/skia/include/gpu/GrContext.h" | 11 #include "third_party/skia/include/gpu/GrContext.h" |
| 11 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" | 12 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" |
| 12 #include "webkit/common/gpu/webgraphicscontext3d_impl.h" | 13 |
| 14 using gpu_blink::WebGraphicsContext3DImpl; |
| 13 | 15 |
| 14 namespace webkit { | 16 namespace webkit { |
| 15 namespace gpu { | 17 namespace gpu { |
| 16 | 18 |
| 17 namespace { | 19 namespace { |
| 18 | 20 |
| 19 // Singleton used to initialize and terminate the gles2 library. | 21 // Singleton used to initialize and terminate the gles2 library. |
| 20 class GLES2Initializer { | 22 class GLES2Initializer { |
| 21 public: | 23 public: |
| 22 GLES2Initializer() { gles2::Initialize(); } | 24 GLES2Initializer() { gles2::Initialize(); } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 void GrContextForWebGraphicsContext3D::FreeGpuResources() { | 83 void GrContextForWebGraphicsContext3D::FreeGpuResources() { |
| 82 if (gr_context_) { | 84 if (gr_context_) { |
| 83 TRACE_EVENT_INSTANT0("gpu", "GrContext::freeGpuResources", \ | 85 TRACE_EVENT_INSTANT0("gpu", "GrContext::freeGpuResources", \ |
| 84 TRACE_EVENT_SCOPE_THREAD); | 86 TRACE_EVENT_SCOPE_THREAD); |
| 85 gr_context_->freeGpuResources(); | 87 gr_context_->freeGpuResources(); |
| 86 } | 88 } |
| 87 } | 89 } |
| 88 | 90 |
| 89 } // namespace gpu | 91 } // namespace gpu |
| 90 } // namespace webkit | 92 } // namespace webkit |
| OLD | NEW |