OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_ | 5 #ifndef ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_ |
6 #define ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_ | 6 #define ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_ |
7 | 7 |
8 #ifdef __cplusplus | 8 #ifdef __cplusplus |
9 extern "C" { | 9 extern "C" { |
10 #endif | 10 #endif |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 typedef void AwReleaseGraphicBufferFunction(long buffer_id); | 79 typedef void AwReleaseGraphicBufferFunction(long buffer_id); |
80 // Called to map a GraphicBuffer in |mode|. | 80 // Called to map a GraphicBuffer in |mode|. |
81 typedef int AwMapFunction(long buffer_id, AwMapMode mode, void** vaddr); | 81 typedef int AwMapFunction(long buffer_id, AwMapMode mode, void** vaddr); |
82 // Called to unmap a GraphicBuffer | 82 // Called to unmap a GraphicBuffer |
83 typedef int AwUnmapFunction(long buffer_id); | 83 typedef int AwUnmapFunction(long buffer_id); |
84 // Called to get a native buffer pointer | 84 // Called to get a native buffer pointer |
85 typedef void* AwGetNativeBufferFunction(long buffer_id); | 85 typedef void* AwGetNativeBufferFunction(long buffer_id); |
86 // Called to get the stride of the buffer | 86 // Called to get the stride of the buffer |
87 typedef unsigned int AwGetStrideFunction(long buffer_id); | 87 typedef unsigned int AwGetStrideFunction(long buffer_id); |
88 | 88 |
| 89 static const int kAwDrawGLFunctionTableVersion = 1; |
| 90 |
89 // Set of functions used in rendering in hardware mode | 91 // Set of functions used in rendering in hardware mode |
90 struct AwDrawGLFunctionTable { | 92 struct AwDrawGLFunctionTable { |
| 93 int version; |
91 AwCreateGraphicBufferFunction* create_graphic_buffer; | 94 AwCreateGraphicBufferFunction* create_graphic_buffer; |
92 AwReleaseGraphicBufferFunction* release_graphic_buffer; | 95 AwReleaseGraphicBufferFunction* release_graphic_buffer; |
93 AwMapFunction* map; | 96 AwMapFunction* map; |
94 AwUnmapFunction* unmap; | 97 AwUnmapFunction* unmap; |
95 AwGetNativeBufferFunction* get_native_buffer; | 98 AwGetNativeBufferFunction* get_native_buffer; |
96 AwGetStrideFunction* get_stride; | 99 AwGetStrideFunction* get_stride; |
97 }; | 100 }; |
98 | 101 |
99 #ifdef __cplusplus | 102 #ifdef __cplusplus |
100 } // extern "C" | 103 } // extern "C" |
101 #endif | 104 #endif |
102 | 105 |
103 #endif // ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_ | 106 #endif // ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_ |
OLD | NEW |