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

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, 1 month 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_surface_texture.h ('k') | ui/gl/test/gl_image_test_template.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 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
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
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
OLDNEW
« no previous file with comments | « ui/gl/gl_image_surface_texture.h ('k') | ui/gl/test/gl_image_test_template.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698