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

Side by Side Diff: ui/gl/gl_image_egl.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gl/gl_image_egl.h ('k') | ui/gl/gl_image_glx.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "ui/gl/gl_image_egl.h" 5 #include "ui/gl/gl_image_egl.h"
6 6
7 #include "ui/gl/gl_surface_egl.h" 7 #include "ui/gl/gl_surface_egl.h"
8 8
9 namespace gfx { 9 namespace gfx {
10 10
11 GLImageEGL::GLImageEGL(gfx::Size size) 11 GLImageEGL::GLImageEGL(const gfx::Size& size)
12 : egl_image_(EGL_NO_IMAGE_KHR), size_(size) {} 12 : egl_image_(EGL_NO_IMAGE_KHR), size_(size) {
13 }
13 14
14 GLImageEGL::~GLImageEGL() { Destroy(); } 15 GLImageEGL::~GLImageEGL() { Destroy(); }
15 16
16 bool GLImageEGL::Initialize(EGLenum target, 17 bool GLImageEGL::Initialize(EGLenum target,
17 EGLClientBuffer buffer, 18 EGLClientBuffer buffer,
18 const EGLint* attrs) { 19 const EGLint* attrs) {
19 DCHECK_EQ(EGL_NO_IMAGE_KHR, egl_image_); 20 DCHECK_EQ(EGL_NO_IMAGE_KHR, egl_image_);
20 egl_image_ = eglCreateImageKHR(GLSurfaceEGL::GetHardwareDisplay(), 21 egl_image_ = eglCreateImageKHR(GLSurfaceEGL::GetHardwareDisplay(),
21 EGL_NO_CONTEXT, 22 EGL_NO_CONTEXT,
22 target, 23 target,
(...skipping 18 matching lines...) Expand all
41 gfx::Size GLImageEGL::GetSize() { return size_; } 42 gfx::Size GLImageEGL::GetSize() { return size_; }
42 43
43 bool GLImageEGL::BindTexImage(unsigned target) { 44 bool GLImageEGL::BindTexImage(unsigned target) {
44 DCHECK_NE(EGL_NO_IMAGE_KHR, egl_image_); 45 DCHECK_NE(EGL_NO_IMAGE_KHR, egl_image_);
45 glEGLImageTargetTexture2DOES(target, egl_image_); 46 glEGLImageTargetTexture2DOES(target, egl_image_);
46 DCHECK_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); 47 DCHECK_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
47 return true; 48 return true;
48 } 49 }
49 50
50 } // namespace gfx 51 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_image_egl.h ('k') | ui/gl/gl_image_glx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698