| Index: webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
|
| diff --git a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
|
| index 992bcb4ee01b72b6a7b141d139f1272536bdda48..54253a89a639e4ef4b7220fa6171e748df6286ed 100644
|
| --- a/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
|
| +++ b/webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
|
| @@ -293,13 +293,6 @@ void WebGraphicsContext3DInProcessCommandBufferImpl::name( \
|
| gl_->glname(a1, a2, a3); \
|
| }
|
|
|
| -#define DELEGATE_TO_GL_3R(name, glname, t1, t2, t3, rt) \
|
| -rt WebGraphicsContext3DInProcessCommandBufferImpl::name( \
|
| - t1 a1, t2 a2, t3 a3) { \
|
| - ClearContext(); \
|
| - return gl_->glname(a1, a2, a3); \
|
| -}
|
| -
|
| #define DELEGATE_TO_GL_4(name, glname, t1, t2, t3, t4) \
|
| void WebGraphicsContext3DInProcessCommandBufferImpl::name( \
|
| t1 a1, t2 a2, t3 a3, t4 a4) { \
|
| @@ -307,6 +300,13 @@ void WebGraphicsContext3DInProcessCommandBufferImpl::name( \
|
| gl_->glname(a1, a2, a3, a4); \
|
| }
|
|
|
| +#define DELEGATE_TO_GL_4R(name, glname, t1, t2, t3, t4, rt) \
|
| + rt WebGraphicsContext3DInProcessCommandBufferImpl::name( \
|
| + t1 a1, t2 a2, t3 a3, t4 a4) { \
|
| + ClearContext(); \
|
| + return gl_->glname(a1, a2, a3, a4); \
|
| + }
|
| +
|
| #define DELEGATE_TO_GL_5(name, glname, t1, t2, t3, t4, t5) \
|
| void WebGraphicsContext3DInProcessCommandBufferImpl::name( \
|
| t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) { \
|
| @@ -1138,16 +1138,35 @@ void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() {
|
| }
|
| }
|
|
|
| -DELEGATE_TO_GL_3R(createImageCHROMIUM, CreateImageCHROMIUM,
|
| - WGC3Dsizei, WGC3Dsizei, WGC3Denum, WGC3Duint);
|
| +DELEGATE_TO_GL_4R(createImageCHROMIUM,
|
| + CreateImageCHROMIUM,
|
| + WGC3Dsizei,
|
| + WGC3Dsizei,
|
| + WGC3Denum,
|
| + WGC3Denum,
|
| + WGC3Duint);
|
| +
|
| +WGC3Duint WebGraphicsContext3DInProcessCommandBufferImpl::createImageCHROMIUM(
|
| + WGC3Dsizei width,
|
| + WGC3Dsizei height,
|
| + WGC3Denum internalformat) {
|
| + ClearContext();
|
| + return gl_->CreateImageCHROMIUM(width, height, internalformat, GL_READ_WRITE);
|
| +}
|
|
|
| DELEGATE_TO_GL_1(destroyImageCHROMIUM, DestroyImageCHROMIUM, WGC3Duint);
|
|
|
| DELEGATE_TO_GL_3(getImageParameterivCHROMIUM, GetImageParameterivCHROMIUM,
|
| WGC3Duint, WGC3Denum, GLint*);
|
|
|
| -DELEGATE_TO_GL_2R(mapImageCHROMIUM, MapImageCHROMIUM,
|
| - WGC3Duint, WGC3Denum, void*);
|
| +DELEGATE_TO_GL_1R(mapImageCHROMIUM, MapImageCHROMIUM, WGC3Duint, void*);
|
| +
|
| +void* WebGraphicsContext3DInProcessCommandBufferImpl::mapImageCHROMIUM(
|
| + WGC3Duint image_id,
|
| + WGC3Denum access) {
|
| + ClearContext();
|
| + return gl_->MapImageCHROMIUM(image_id);
|
| +}
|
|
|
| DELEGATE_TO_GL_1(unmapImageCHROMIUM, UnmapImageCHROMIUM, WGC3Duint);
|
|
|
|
|