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

Side by Side Diff: ui/gfx/gl/gl_surface_glx.cc

Issue 8512005: Plumb through EGL_NV_post_sub_buffer and GLX_MESA_copy_sub_buffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/gfx/gl/gl_surface_glx.h" 9 #include "ui/gfx/gl/gl_surface_glx.h"
10 10
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 } 197 }
198 if (found) { 198 if (found) {
199 config_ = configs.get()[i]; 199 config_ = configs.get()[i];
200 } 200 }
201 } 201 }
202 202
203 return config_; 203 return config_;
204 } 204 }
205 205
206 bool NativeViewGLSurfaceGLX::SupportsPostSubBuffer() {
207 return g_GLX_MESA_copy_sub_buffer;
208 }
209
210 bool NativeViewGLSurfaceGLX::PostSubBuffer(
211 int x, int y, int width, int height) {
212 DCHECK(SupportsPostSubBuffer());
213 glXCopySubBufferMESA(g_display, window_, x, y, width, height);
214 return true;
215 }
216
206 PbufferGLSurfaceGLX::PbufferGLSurfaceGLX(const gfx::Size& size) 217 PbufferGLSurfaceGLX::PbufferGLSurfaceGLX(const gfx::Size& size)
207 : size_(size), 218 : size_(size),
208 config_(NULL), 219 config_(NULL),
209 pbuffer_(0) { 220 pbuffer_(0) {
210 } 221 }
211 222
212 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { 223 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() {
213 Destroy(); 224 Destroy();
214 } 225 }
215 226
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 297
287 void* PbufferGLSurfaceGLX::GetHandle() { 298 void* PbufferGLSurfaceGLX::GetHandle() {
288 return reinterpret_cast<void*>(pbuffer_); 299 return reinterpret_cast<void*>(pbuffer_);
289 } 300 }
290 301
291 void* PbufferGLSurfaceGLX::GetConfig() { 302 void* PbufferGLSurfaceGLX::GetConfig() {
292 return config_; 303 return config_;
293 } 304 }
294 305
295 } // namespace gfx 306 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698