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

Unified Diff: ui/gl/gl_image_android_native_buffer.cc

Issue 331723003: gpu: Remove Create/DeleteImage IPC by adding an X11_PIXMAP_BUFFER GpuMemoryBuffer type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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
« no previous file with comments | « ui/gl/gl_image_android_native_buffer.h ('k') | ui/gl/gl_image_egl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_image_android_native_buffer.cc
diff --git a/ui/gl/gl_image_android_native_buffer.cc b/ui/gl/gl_image_android_native_buffer.cc
index 6d11497b2a31ccd36bef9b7231917b194b89438d..5e311eeef785a3934fc7604e35942498d81cc650 100644
--- a/ui/gl/gl_image_android_native_buffer.cc
+++ b/ui/gl/gl_image_android_native_buffer.cc
@@ -9,22 +9,21 @@
namespace gfx {
-GLImageAndroidNativeBuffer::GLImageAndroidNativeBuffer(gfx::Size size)
+GLImageAndroidNativeBuffer::GLImageAndroidNativeBuffer(const gfx::Size& size)
: GLImageEGL(size),
release_after_use_(false),
in_use_(false),
target_(0),
egl_image_for_unbind_(EGL_NO_IMAGE_KHR),
- texture_id_for_unbind_(0) {}
+ texture_id_for_unbind_(0) {
+}
GLImageAndroidNativeBuffer::~GLImageAndroidNativeBuffer() { Destroy(); }
-bool GLImageAndroidNativeBuffer::Initialize(gfx::GpuMemoryBufferHandle buffer) {
- DCHECK(buffer.native_buffer);
-
+bool GLImageAndroidNativeBuffer::Initialize(EGLClientBuffer native_buffer) {
EGLint attrs[] = {EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, EGL_NONE};
return GLImageEGL::Initialize(
- EGL_NATIVE_BUFFER_ANDROID, buffer.native_buffer, attrs);
+ EGL_NATIVE_BUFFER_ANDROID, native_buffer, attrs);
}
void GLImageAndroidNativeBuffer::Destroy() {
« no previous file with comments | « ui/gl/gl_image_android_native_buffer.h ('k') | ui/gl/gl_image_egl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698