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

Side by Side Diff: ui/gl/gl_image_egl.cc

Issue 1140683002: glBindTexImage2DCHROMIUM should retain pixel format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
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/egl_util.h" 7 #include "ui/gl/egl_util.h"
8 #include "ui/gl/gl_surface_egl.h" 8 #include "ui/gl/gl_surface_egl.h"
9 9
10 namespace gfx { 10 namespace gfx {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 if (result == EGL_FALSE) { 44 if (result == EGL_FALSE) {
45 DLOG(ERROR) << "Error destroying EGLImage: " 45 DLOG(ERROR) << "Error destroying EGLImage: "
46 << ui::GetLastEGLErrorString(); 46 << ui::GetLastEGLErrorString();
47 } 47 }
48 egl_image_ = EGL_NO_IMAGE_KHR; 48 egl_image_ = EGL_NO_IMAGE_KHR;
49 } 49 }
50 } 50 }
51 51
52 gfx::Size GLImageEGL::GetSize() { return size_; } 52 gfx::Size GLImageEGL::GetSize() { return size_; }
53 53
54 unsigned GLImageEGL::GetFormat() { return 0; }
reveman 2015/05/12 15:27:19 Please return a valid default value here (say GL_R
55
54 bool GLImageEGL::BindTexImage(unsigned target) { 56 bool GLImageEGL::BindTexImage(unsigned target) {
55 DCHECK(thread_checker_.CalledOnValidThread()); 57 DCHECK(thread_checker_.CalledOnValidThread());
56 DCHECK_NE(EGL_NO_IMAGE_KHR, egl_image_); 58 DCHECK_NE(EGL_NO_IMAGE_KHR, egl_image_);
57 glEGLImageTargetTexture2DOES(target, egl_image_); 59 glEGLImageTargetTexture2DOES(target, egl_image_);
58 DCHECK_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); 60 DCHECK_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
59 return true; 61 return true;
60 } 62 }
61 63
62 bool GLImageEGL::CopyTexImage(unsigned target) { 64 bool GLImageEGL::CopyTexImage(unsigned target) {
63 return false; 65 return false;
64 } 66 }
65 67
66 bool GLImageEGL::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, 68 bool GLImageEGL::ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
67 int z_order, 69 int z_order,
68 OverlayTransform transform, 70 OverlayTransform transform,
69 const Rect& bounds_rect, 71 const Rect& bounds_rect,
70 const RectF& crop_rect) { 72 const RectF& crop_rect) {
71 return false; 73 return false;
72 } 74 }
73 75
74 } // namespace gfx 76 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698