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

Side by Side Diff: content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.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 #if defined(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" 7 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h"
8 8
9 #include "gpu/GLES2/gl2.h" 9 #include "gpu/GLES2/gl2.h"
10 #ifndef GL_GLEXT_PROTOTYPES 10 #ifndef GL_GLEXT_PROTOTYPES
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 &WebGraphicsContext3DCommandBufferImpl::OnSwapBuffersComplete, 285 &WebGraphicsContext3DCommandBufferImpl::OnSwapBuffersComplete,
286 weak_ptr_factory_.GetWeakPtr())); 286 weak_ptr_factory_.GetWeakPtr()));
287 #if defined(OS_MACOSX) 287 #if defined(OS_MACOSX)
288 // It appears that making the compositor's on-screen context current on 288 // It appears that making the compositor's on-screen context current on
289 // other platforms implies this flush. TODO(kbr): this means that the 289 // other platforms implies this flush. TODO(kbr): this means that the
290 // TOUCH build and, in the future, other platforms might need this. 290 // TOUCH build and, in the future, other platforms might need this.
291 gl_->Flush(); 291 gl_->Flush();
292 #endif 292 #endif
293 } 293 }
294 294
295 void WebGraphicsContext3DCommandBufferImpl::postSubBufferCHROMIUM(
296 int x, int y, int width, int height) {
297 gl_->PostSubBufferCHROMIUM(x, y, width, height);
298 // FIXME(backer): Do we need a flush?
299 }
300
295 void WebGraphicsContext3DCommandBufferImpl::reshape(int width, int height) { 301 void WebGraphicsContext3DCommandBufferImpl::reshape(int width, int height) {
296 cached_width_ = width; 302 cached_width_ = width;
297 cached_height_ = height; 303 cached_height_ = height;
298 304
299 gl_->ResizeCHROMIUM(width, height); 305 gl_->ResizeCHROMIUM(width, height);
300 306
301 #ifdef FLIP_FRAMEBUFFER_VERTICALLY 307 #ifdef FLIP_FRAMEBUFFER_VERTICALLY
302 scanline_.reset(new uint8[width * 4]); 308 scanline_.reset(new uint8[width * 4]);
303 #endif // FLIP_FRAMEBUFFER_VERTICALLY 309 #endif // FLIP_FRAMEBUFFER_VERTICALLY
304 } 310 }
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 if (context_lost_callback_) { 1154 if (context_lost_callback_) {
1149 context_lost_callback_->onContextLost(); 1155 context_lost_callback_->onContextLost();
1150 } 1156 }
1151 RenderViewImpl* renderview = 1157 RenderViewImpl* renderview =
1152 web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL; 1158 web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL;
1153 if (renderview) 1159 if (renderview)
1154 renderview->OnViewContextSwapBuffersAborted(); 1160 renderview->OnViewContextSwapBuffersAborted();
1155 } 1161 }
1156 1162
1157 #endif // defined(ENABLE_GPU) 1163 #endif // defined(ENABLE_GPU)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698