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

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, 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 (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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 glx_pixmap_ = 0; 158 glx_pixmap_ = 0;
159 } 159 }
160 } 160 }
161 161
162 gfx::Size GLImageGLX::GetSize() { 162 gfx::Size GLImageGLX::GetSize() {
163 return size_; 163 return size_;
164 } 164 }
165 165
166 unsigned GLImageGLX::GetInternalFormat() { return internalformat_; } 166 unsigned GLImageGLX::GetInternalFormat() { return internalformat_; }
167 167
168 bool GLImageGLX::BindTexImage(unsigned target) { 168 bool GLImageGLX::BindTexImage(unsigned target, GLFence* fence) {
169 if (!glx_pixmap_) 169 if (!glx_pixmap_)
170 return false; 170 return false;
171 171
172 // Requires TEXTURE_2D target. 172 // Requires TEXTURE_2D target.
173 if (target != GL_TEXTURE_2D) 173 if (target != GL_TEXTURE_2D)
174 return false; 174 return false;
175 175
176 glXBindTexImageEXT(gfx::GetXDisplay(), glx_pixmap_, GLX_FRONT_LEFT_EXT, 0); 176 glXBindTexImageEXT(gfx::GetXDisplay(), glx_pixmap_, GLX_FRONT_LEFT_EXT, 0);
177 return true; 177 return true;
178 } 178 }
(...skipping 23 matching lines...) Expand all
202 return false; 202 return false;
203 } 203 }
204 204
205 void GLImageGLX::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, 205 void GLImageGLX::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
206 uint64_t process_tracing_id, 206 uint64_t process_tracing_id,
207 const std::string& dump_name) { 207 const std::string& dump_name) {
208 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914 208 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914
209 } 209 }
210 210
211 } // namespace gl 211 } // namespace gl
OLDNEW
« ui/gl/gl_image.h ('K') | « 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