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

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

Issue 2388653002: gpu: Add CHROMIUM_texture_from_image spec and fence support.
Patch Set: rebase Created 4 years, 2 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 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 19 matching lines...) Expand all
30 surface_texture_ = NULL; 30 surface_texture_ = NULL;
31 texture_id_ = 0; 31 texture_id_ = 0;
32 } 32 }
33 33
34 gfx::Size GLImageSurfaceTexture::GetSize() { 34 gfx::Size GLImageSurfaceTexture::GetSize() {
35 return size_; 35 return size_;
36 } 36 }
37 37
38 unsigned GLImageSurfaceTexture::GetInternalFormat() { return GL_RGBA; } 38 unsigned GLImageSurfaceTexture::GetInternalFormat() { return GL_RGBA; }
39 39
40 bool GLImageSurfaceTexture::BindTexImage(unsigned target) { 40 bool GLImageSurfaceTexture::BindTexImage(unsigned target, GLFence* fence) {
41 TRACE_EVENT0("gpu", "GLImageSurfaceTexture::BindTexImage"); 41 TRACE_EVENT0("gpu", "GLImageSurfaceTexture::BindTexImage");
42 DCHECK(thread_checker_.CalledOnValidThread()); 42 DCHECK(thread_checker_.CalledOnValidThread());
43 43
44 if (target != GL_TEXTURE_EXTERNAL_OES) { 44 if (target != GL_TEXTURE_EXTERNAL_OES) {
45 LOG(ERROR) 45 LOG(ERROR)
46 << "Surface texture can only be bound to TEXTURE_EXTERNAL_OES target"; 46 << "Surface texture can only be bound to TEXTURE_EXTERNAL_OES target";
47 return false; 47 return false;
48 } 48 }
49 49
50 GLint texture_id; 50 GLint texture_id;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 100
101 void GLImageSurfaceTexture::OnMemoryDump( 101 void GLImageSurfaceTexture::OnMemoryDump(
102 base::trace_event::ProcessMemoryDump* pmd, 102 base::trace_event::ProcessMemoryDump* pmd,
103 uint64_t process_tracing_id, 103 uint64_t process_tracing_id,
104 const std::string& dump_name) { 104 const std::string& dump_name) {
105 // TODO(ericrk): Add OnMemoryDump for GLImages. crbug.com/514914 105 // TODO(ericrk): Add OnMemoryDump for GLImages. crbug.com/514914
106 } 106 }
107 107
108 } // namespace gl 108 } // namespace gl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698