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

Side by Side Diff: ui/gl/gl_image_glx.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_glx.h ('k') | ui/gl/gl_image_io_surface.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 extern "C" { 5 extern "C" {
6 #include <X11/Xlib.h> 6 #include <X11/Xlib.h>
7 } 7 }
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 return true; 153 return true;
154 } 154 }
155 155
156 gfx::Size GLImageGLX::GetSize() { 156 gfx::Size GLImageGLX::GetSize() {
157 return size_; 157 return size_;
158 } 158 }
159 159
160 unsigned GLImageGLX::GetInternalFormat() { return internalformat_; } 160 unsigned GLImageGLX::GetInternalFormat() { return internalformat_; }
161 161
162 bool GLImageGLX::BindTexImage(unsigned target) { 162 bool GLImageGLX::BindTexImage(unsigned target, GLFence* fence) {
163 if (!glx_pixmap_) 163 if (!glx_pixmap_)
164 return false; 164 return false;
165 165
166 // Requires TEXTURE_2D target. 166 // Requires TEXTURE_2D target.
167 if (target != GL_TEXTURE_2D) 167 if (target != GL_TEXTURE_2D)
168 return false; 168 return false;
169 169
170 glXBindTexImageEXT(gfx::GetXDisplay(), glx_pixmap_, GLX_FRONT_LEFT_EXT, 0); 170 glXBindTexImageEXT(gfx::GetXDisplay(), glx_pixmap_, GLX_FRONT_LEFT_EXT, 0);
171 return true; 171 return true;
172 } 172 }
(...skipping 23 matching lines...) Expand all
196 return false; 196 return false;
197 } 197 }
198 198
199 void GLImageGLX::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, 199 void GLImageGLX::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
200 uint64_t process_tracing_id, 200 uint64_t process_tracing_id,
201 const std::string& dump_name) { 201 const std::string& dump_name) {
202 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914 202 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914
203 } 203 }
204 204
205 } // namespace gl 205 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_image_glx.h ('k') | ui/gl/gl_image_io_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698