| 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 gl { | 10 namespace gl { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 surface_texture_ = surface_texture; | 22 surface_texture_ = surface_texture; |
| 23 return true; | 23 return true; |
| 24 } | 24 } |
| 25 | 25 |
| 26 gfx::Size GLImageSurfaceTexture::GetSize() { | 26 gfx::Size GLImageSurfaceTexture::GetSize() { |
| 27 return size_; | 27 return size_; |
| 28 } | 28 } |
| 29 | 29 |
| 30 unsigned GLImageSurfaceTexture::GetInternalFormat() { return GL_RGBA; } | 30 unsigned GLImageSurfaceTexture::GetInternalFormat() { return GL_RGBA; } |
| 31 | 31 |
| 32 bool GLImageSurfaceTexture::BindTexImage(unsigned target) { | 32 bool GLImageSurfaceTexture::BindTexImage(unsigned target, GLFence* fence) { |
| 33 TRACE_EVENT0("gpu", "GLImageSurfaceTexture::BindTexImage"); | 33 TRACE_EVENT0("gpu", "GLImageSurfaceTexture::BindTexImage"); |
| 34 DCHECK(thread_checker_.CalledOnValidThread()); | 34 DCHECK(thread_checker_.CalledOnValidThread()); |
| 35 | 35 |
| 36 if (target != GL_TEXTURE_EXTERNAL_OES) { | 36 if (target != GL_TEXTURE_EXTERNAL_OES) { |
| 37 LOG(ERROR) | 37 LOG(ERROR) |
| 38 << "Surface texture can only be bound to TEXTURE_EXTERNAL_OES target"; | 38 << "Surface texture can only be bound to TEXTURE_EXTERNAL_OES target"; |
| 39 return false; | 39 return false; |
| 40 } | 40 } |
| 41 | 41 |
| 42 GLint texture_id; | 42 GLint texture_id; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 } | 91 } |
| 92 | 92 |
| 93 void GLImageSurfaceTexture::OnMemoryDump( | 93 void GLImageSurfaceTexture::OnMemoryDump( |
| 94 base::trace_event::ProcessMemoryDump* pmd, | 94 base::trace_event::ProcessMemoryDump* pmd, |
| 95 uint64_t process_tracing_id, | 95 uint64_t process_tracing_id, |
| 96 const std::string& dump_name) { | 96 const std::string& dump_name) { |
| 97 // TODO(ericrk): Add OnMemoryDump for GLImages. crbug.com/514914 | 97 // TODO(ericrk): Add OnMemoryDump for GLImages. crbug.com/514914 |
| 98 } | 98 } |
| 99 | 99 |
| 100 } // namespace gl | 100 } // namespace gl |
| OLD | NEW |