| 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/gpu/grcontext_for_webgraphicscontext3d.h" | 5 #include "webkit/gpu/grcontext_for_webgraphicscontext3d.h" |
| 6 | 6 |
| 7 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 7 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| 8 #include "third_party/skia/include/gpu/GrContext.h" | 8 #include "third_party/skia/include/gpu/GrContext.h" |
| 9 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" | 9 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" |
| 10 | 10 |
| 11 namespace webkit { | 11 namespace webkit { |
| 12 namespace gpu { | 12 namespace gpu { |
| 13 | 13 |
| 14 static void BindWebGraphicsContext3DGLContextCallback( | 14 static void BindWebGraphicsContext3DGLContextCallback( |
| 15 const GrGLInterface* interface) { | 15 const GrGLInterface* interface) { |
| 16 reinterpret_cast<WebKit::WebGraphicsContext3D*>( | 16 reinterpret_cast<WebKit::WebGraphicsContext3D*>( |
| 17 interface->fCallbackData)->makeContextCurrent(); | 17 interface->fCallbackData)->makeContextCurrent(); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 gr_context_->setTextureCacheLimits( | 61 gr_context_->setTextureCacheLimits( |
| 62 kMaxGaneshTextureCacheCount, kMaxGaneshTextureCacheBytes); | 62 kMaxGaneshTextureCacheCount, kMaxGaneshTextureCacheBytes); |
| 63 } else { | 63 } else { |
| 64 gr_context_->freeGpuResources(); | 64 gr_context_->freeGpuResources(); |
| 65 gr_context_->setTextureCacheLimits(0, 0); | 65 gr_context_->setTextureCacheLimits(0, 0); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace gpu | 69 } // namespace gpu |
| 70 } // namespace webkit | 70 } // namespace webkit |
| OLD | NEW |