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

Side by Side Diff: webkit/gpu/webgraphicscontext3d_in_process_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
« no previous file with comments | « webkit/gpu/webgraphicscontext3d_in_process_impl.h ('k') | no next file » | 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) 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 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" 5 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 void WebGraphicsContext3DInProcessImpl::prepareTexture() { 326 void WebGraphicsContext3DInProcessImpl::prepareTexture() {
327 if (window_ != gfx::kNullPluginWindow) { 327 if (window_ != gfx::kNullPluginWindow) {
328 gl_surface_->SwapBuffers(); 328 gl_surface_->SwapBuffers();
329 } else if (!render_directly_to_web_view_) { 329 } else if (!render_directly_to_web_view_) {
330 // We need to prepare our rendering results for the compositor. 330 // We need to prepare our rendering results for the compositor.
331 makeContextCurrent(); 331 makeContextCurrent();
332 ResolveMultisampledFramebuffer(0, 0, cached_width_, cached_height_); 332 ResolveMultisampledFramebuffer(0, 0, cached_width_, cached_height_);
333 } 333 }
334 } 334 }
335 335
336 void WebGraphicsContext3DInProcessImpl::postSubBufferCHROMIUM(
337 int x, int y, int width, int height) {
338 DCHECK(gl_surface_->SupportsPostSubBuffer());
339 gl_surface_->PostSubBuffer(x, y, width, height);
340 }
341
336 namespace { 342 namespace {
337 343
338 int CreateTextureObject(GLenum target) { 344 int CreateTextureObject(GLenum target) {
339 GLuint texture = 0; 345 GLuint texture = 0;
340 glGenTextures(1, &texture); 346 glGenTextures(1, &texture);
341 glBindTexture(target, texture); 347 glBindTexture(target, texture);
342 glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 348 glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
343 glTexParameterf(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 349 glTexParameterf(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
344 return texture; 350 return texture;
345 } 351 }
(...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 if (length > 1) { 1690 if (length > 1) {
1685 entry->translated_source.reset(new char[length]); 1691 entry->translated_source.reset(new char[length]);
1686 ShGetObjectCode(compiler, entry->translated_source.get()); 1692 ShGetObjectCode(compiler, entry->translated_source.get());
1687 } 1693 }
1688 entry->is_valid = true; 1694 entry->is_valid = true;
1689 return true; 1695 return true;
1690 } 1696 }
1691 1697
1692 } // namespace gpu 1698 } // namespace gpu
1693 } // namespace webkit 1699 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/gpu/webgraphicscontext3d_in_process_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698