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/browser/gpu_memory_buffer_factory_impl.h" | 7 #include "android_webview/browser/gpu_memory_buffer_factory_impl.h" |
8 #include "android_webview/public/browser/draw_gl.h" | 8 #include "android_webview/public/browser/draw_gl.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 void* GpuMemoryBufferImpl::GetNativeBuffer() { | 50 void* GpuMemoryBufferImpl::GetNativeBuffer() { |
51 DCHECK(buffer_id_ != 0); | 51 DCHECK(buffer_id_ != 0); |
52 return g_gl_draw_functions->get_native_buffer(buffer_id_); | 52 return g_gl_draw_functions->get_native_buffer(buffer_id_); |
53 } | 53 } |
54 | 54 |
55 uint32 GpuMemoryBufferImpl::GetStride() { | 55 uint32 GpuMemoryBufferImpl::GetStride() { |
56 DCHECK(buffer_id_ != 0); | 56 DCHECK(buffer_id_ != 0); |
57 return g_gl_draw_functions->get_stride(buffer_id_); | 57 return g_gl_draw_functions->get_stride(buffer_id_); |
58 } | 58 } |
59 | 59 |
| 60 bool GpuMemoryBufferImpl::IsMapped() { |
| 61 return false; |
| 62 } |
| 63 |
60 // static | 64 // static |
61 void GpuMemoryBufferImpl::SetAwDrawGLFunctionTable( | 65 void GpuMemoryBufferImpl::SetAwDrawGLFunctionTable( |
62 AwDrawGLFunctionTable* table) { | 66 AwDrawGLFunctionTable* table) { |
63 g_gl_draw_functions = table; | 67 g_gl_draw_functions = table; |
64 gpu::SetProcessDefaultGpuMemoryBufferFactory( | 68 gpu::SetProcessDefaultGpuMemoryBufferFactory( |
65 base::Bind(&CreateGpuMemoryBuffer)); | 69 base::Bind(&CreateGpuMemoryBuffer)); |
66 } | 70 } |
67 | 71 |
68 } // namespace android_webview | 72 } // namespace android_webview |
OLD | NEW |