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

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

Issue 1140683002: glBindTexImage2DCHROMIUM should retain pixel format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add GetInternalFormat override to MockGLImage. 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
« no previous file with comments | « ui/gl/gl_image_io_surface.h ('k') | ui/gl/gl_image_linux_dma_buffer.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_io_surface.h" 5 #include "ui/gl/gl_image_io_surface.h"
6 6
7 #include "ui/gl/gl_bindings.h" 7 #include "ui/gl/gl_bindings.h"
8 #include "ui/gl/gl_context.h" 8 #include "ui/gl/gl_context.h"
9 9
10 // Note that this must be included after gl_bindings.h to avoid conflicts. 10 // Note that this must be included after gl_bindings.h to avoid conflicts.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return true; 143 return true;
144 } 144 }
145 145
146 void GLImageIOSurface::Destroy(bool have_context) { 146 void GLImageIOSurface::Destroy(bool have_context) {
147 DCHECK(thread_checker_.CalledOnValidThread()); 147 DCHECK(thread_checker_.CalledOnValidThread());
148 io_surface_.reset(); 148 io_surface_.reset();
149 } 149 }
150 150
151 gfx::Size GLImageIOSurface::GetSize() { return size_; } 151 gfx::Size GLImageIOSurface::GetSize() { return size_; }
152 152
153 unsigned GLImageIOSurface::GetInternalFormat() { return internalformat_; }
154
153 bool GLImageIOSurface::BindTexImage(unsigned target) { 155 bool GLImageIOSurface::BindTexImage(unsigned target) {
154 DCHECK(thread_checker_.CalledOnValidThread()); 156 DCHECK(thread_checker_.CalledOnValidThread());
155 if (target != GL_TEXTURE_RECTANGLE_ARB) { 157 if (target != GL_TEXTURE_RECTANGLE_ARB) {
156 // This might be supported in the future. For now, perform strict 158 // This might be supported in the future. For now, perform strict
157 // validation so we know what's going on. 159 // validation so we know what's going on.
158 LOG(ERROR) << "IOSurface requires TEXTURE_RECTANGLE_ARB target"; 160 LOG(ERROR) << "IOSurface requires TEXTURE_RECTANGLE_ARB target";
159 return false; 161 return false;
160 } 162 }
161 163
162 CGLContextObj cgl_context = 164 CGLContextObj cgl_context =
(...skipping 18 matching lines...) Expand all
181 183
182 bool GLImageIOSurface::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, 184 bool GLImageIOSurface::ScheduleOverlayPlane(gfx::AcceleratedWidget widget,
183 int z_order, 185 int z_order,
184 OverlayTransform transform, 186 OverlayTransform transform,
185 const Rect& bounds_rect, 187 const Rect& bounds_rect,
186 const RectF& crop_rect) { 188 const RectF& crop_rect) {
187 return false; 189 return false;
188 } 190 }
189 191
190 } // namespace gfx 192 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_image_io_surface.h ('k') | ui/gl/gl_image_linux_dma_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698