Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc

Issue 255713008: Change glimage to accept a type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..0aeeb7eea6c116718e2fb39220666f047bfa3a46 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,36 @@ 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_IMAGE_CPU_READ_WRITE_CHROMIUM);
+}
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);

Powered by Google App Engine
This is Rietveld 408576698