| OLD | NEW |
| 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 Loading... |
| 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::GetFormat() { 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 Loading... |
| 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 |
| OLD | NEW |