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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // |spare| ignored; pass NULL. | 76 // |spare| ignored; pass NULL. |
77 typedef void (AwDrawGLFunction)(int view_context, | 77 typedef void (AwDrawGLFunction)(int view_context, |
78 AwDrawGLInfo* draw_info, | 78 AwDrawGLInfo* draw_info, |
79 void* spare); | 79 void* spare); |
80 | 80 |
81 // Called to create a GraphicBuffer | 81 // Called to create a GraphicBuffer |
82 typedef int AwCreateGraphicBufferFunction(int w, int h); | 82 typedef int AwCreateGraphicBufferFunction(int w, int h); |
83 // Called to release a GraphicBuffer | 83 // Called to release a GraphicBuffer |
84 typedef void AwReleaseGraphicBufferFunction(int buffer_id); | 84 typedef void AwReleaseGraphicBufferFunction(int buffer_id); |
85 // Called to lock a GraphicBuffer in |mode|, which is | 85 // Called to lock a GraphicBuffer in |mode|, which is |
86 // defined in AccessMode enum in ui/gl/gpu_memory_buffer.h | 86 // defined in AccessMode enum in gpu/command_buffer/client/gpu_memory_buffer.h |
87 typedef int AwLockFunction(int buffer_id, int mode, void** vaddr); | 87 typedef int AwLockFunction(int buffer_id, int mode, void** vaddr); |
88 // Called to unlock a GraphicBuffer | 88 // Called to unlock a GraphicBuffer |
89 typedef int AwUnlockFunction(int buffer_id); | 89 typedef int AwUnlockFunction(int buffer_id); |
90 // Called to get a native buffer pointer | 90 // Called to get a native buffer pointer |
91 typedef void* AwGetNativeBufferFunction(int buffer_id); | 91 typedef void* AwGetNativeBufferFunction(int buffer_id); |
92 // Called to get the stride of the buffer | 92 // Called to get the stride of the buffer |
93 typedef unsigned int AwGetStrideFunction(int buffer_id); | 93 typedef unsigned int AwGetStrideFunction(int buffer_id); |
94 | 94 |
95 // Set of functions used in rendering in hardware mode | 95 // Set of functions used in rendering in hardware mode |
96 struct AwDrawGLFunctionTable { | 96 struct AwDrawGLFunctionTable { |
97 AwCreateGraphicBufferFunction* create_graphic_buffer; | 97 AwCreateGraphicBufferFunction* create_graphic_buffer; |
98 AwReleaseGraphicBufferFunction* release_graphic_buffer; | 98 AwReleaseGraphicBufferFunction* release_graphic_buffer; |
99 AwLockFunction* lock; | 99 AwLockFunction* lock; |
100 AwUnlockFunction* unlock; | 100 AwUnlockFunction* unlock; |
101 AwGetNativeBufferFunction* get_native_buffer; | 101 AwGetNativeBufferFunction* get_native_buffer; |
102 AwGetStrideFunction* get_stride; | 102 AwGetStrideFunction* get_stride; |
103 }; | 103 }; |
104 | 104 |
105 #ifdef __cplusplus | 105 #ifdef __cplusplus |
106 } // extern "C" | 106 } // extern "C" |
107 #endif | 107 #endif |
108 | 108 |
109 #endif // ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_ | 109 #endif // ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_GL_H_ |
OLD | NEW |