OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "android_webview/browser/gpu_memory_buffer_impl.h" | 5 #include "android_webview/browser/gpu_memory_buffer_impl.h" |
6 | 6 |
7 #include "android_webview/public/browser/draw_gl.h" | 7 #include "android_webview/public/browser/draw_gl.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "gpu/command_buffer/client/gpu_memory_buffer.h" | 10 #include "gpu/command_buffer/client/gpu_memory_buffer.h" |
11 #include "ui/gfx/size.h" | 11 #include "ui/gfx/size.h" |
12 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" | 12 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" |
13 | 13 |
14 namespace android_webview { | 14 namespace android_webview { |
15 | 15 |
16 // Provides hardware rendering functions from the Android glue layer. | 16 // Provides hardware rendering functions from the Android glue layer. |
17 AwDrawGLFunctionTable* g_gl_draw_functions = NULL; | 17 AwDrawGLFunctionTable* g_gl_draw_functions = NULL; |
18 | 18 |
19 GpuMemoryBufferImpl::GpuMemoryBufferImpl(gfx::Size size) | 19 GpuMemoryBufferImpl::GpuMemoryBufferImpl(gfx::Size size) |
20 : buffer_id_(g_gl_draw_functions->create_graphic_buffer( | 20 : buffer_id_(g_gl_draw_functions->create_graphic_buffer( |
21 size.width(), size.height())), | 21 size.width(), size.height())), |
22 size_(size), | 22 size_(size), |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // static | 92 // static |
93 void GpuMemoryBufferImpl::SetAwDrawGLFunctionTable( | 93 void GpuMemoryBufferImpl::SetAwDrawGLFunctionTable( |
94 AwDrawGLFunctionTable* table) { | 94 AwDrawGLFunctionTable* table) { |
95 g_gl_draw_functions = table; | 95 g_gl_draw_functions = table; |
96 ::webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl:: | 96 ::webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl:: |
97 SetGpuMemoryBufferCreator(&CreateGpuMemoryBuffer); | 97 SetGpuMemoryBufferCreator(&CreateGpuMemoryBuffer); |
98 } | 98 } |
99 | 99 |
100 } // namespace android_webview | 100 } // namespace android_webview |
OLD | NEW |