| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_surface_texture.h" | 5 #include "ui/gl/gl_image_surface_texture.h" |
| 6 | 6 |
| 7 #include "base/trace_event/trace_event.h" | 7 #include "base/trace_event/trace_event.h" |
| 8 #include "ui/gl/android/surface_texture.h" | 8 #include "ui/gl/android/surface_texture.h" |
| 9 | 9 |
| 10 namespace gfx { | 10 namespace gfx { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 } | 27 } |
| 28 | 28 |
| 29 void GLImageSurfaceTexture::Destroy(bool have_context) { | 29 void GLImageSurfaceTexture::Destroy(bool have_context) { |
| 30 DCHECK(thread_checker_.CalledOnValidThread()); | 30 DCHECK(thread_checker_.CalledOnValidThread()); |
| 31 surface_texture_ = NULL; | 31 surface_texture_ = NULL; |
| 32 texture_id_ = 0; | 32 texture_id_ = 0; |
| 33 } | 33 } |
| 34 | 34 |
| 35 gfx::Size GLImageSurfaceTexture::GetSize() { return size_; } | 35 gfx::Size GLImageSurfaceTexture::GetSize() { return size_; } |
| 36 | 36 |
| 37 unsigned GLImageSurfaceTexture::GetInternalFormat() { return GL_RGBA; } |
| 38 |
| 37 bool GLImageSurfaceTexture::BindTexImage(unsigned target) { | 39 bool GLImageSurfaceTexture::BindTexImage(unsigned target) { |
| 38 TRACE_EVENT0("gpu", "GLImageSurfaceTexture::BindTexImage"); | 40 TRACE_EVENT0("gpu", "GLImageSurfaceTexture::BindTexImage"); |
| 39 DCHECK(thread_checker_.CalledOnValidThread()); | 41 DCHECK(thread_checker_.CalledOnValidThread()); |
| 40 | 42 |
| 41 if (target != GL_TEXTURE_EXTERNAL_OES) { | 43 if (target != GL_TEXTURE_EXTERNAL_OES) { |
| 42 LOG(ERROR) | 44 LOG(ERROR) |
| 43 << "Surface texture can only be bound to TEXTURE_EXTERNAL_OES target"; | 45 << "Surface texture can only be bound to TEXTURE_EXTERNAL_OES target"; |
| 44 return false; | 46 return false; |
| 45 } | 47 } |
| 46 | 48 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 84 |
| 83 bool GLImageSurfaceTexture::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | 85 bool GLImageSurfaceTexture::ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
| 84 int z_order, | 86 int z_order, |
| 85 OverlayTransform transform, | 87 OverlayTransform transform, |
| 86 const Rect& bounds_rect, | 88 const Rect& bounds_rect, |
| 87 const RectF& crop_rect) { | 89 const RectF& crop_rect) { |
| 88 return false; | 90 return false; |
| 89 } | 91 } |
| 90 | 92 |
| 91 } // namespace gfx | 93 } // namespace gfx |
| OLD | NEW |