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

Side by Side Diff: webkit/gpu/webgraphicscontext3d_in_process_impl.cc

Issue 8566041: Allow GLSurface to indicate that it supports a specific extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix gpu_unittests. 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 | « ui/gfx/gl/gl_surface_glx.cc ('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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
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( 336 void WebGraphicsContext3DInProcessImpl::postSubBufferCHROMIUM(
337 int x, int y, int width, int height) { 337 int x, int y, int width, int height) {
338 DCHECK(gl_surface_->SupportsPostSubBuffer()); 338 DCHECK(gl_context_->HasExtension("GL_CHROMIUM_post_sub_buffer"));
339 gl_surface_->PostSubBuffer(x, y, width, height); 339 gl_surface_->PostSubBuffer(x, y, width, height);
340 } 340 }
341 341
342 namespace { 342 namespace {
343 343
344 int CreateTextureObject(GLenum target) { 344 int CreateTextureObject(GLenum target) {
345 GLuint texture = 0; 345 GLuint texture = 0;
346 glGenTextures(1, &texture); 346 glGenTextures(1, &texture);
347 glBindTexture(target, texture); 347 glBindTexture(target, texture);
348 glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 348 glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1690 if (length > 1) { 1690 if (length > 1) {
1691 entry->translated_source.reset(new char[length]); 1691 entry->translated_source.reset(new char[length]);
1692 ShGetObjectCode(compiler, entry->translated_source.get()); 1692 ShGetObjectCode(compiler, entry->translated_source.get());
1693 } 1693 }
1694 entry->is_valid = true; 1694 entry->is_valid = true;
1695 return true; 1695 return true;
1696 } 1696 }
1697 1697
1698 } // namespace gpu 1698 } // namespace gpu
1699 } // namespace webkit 1699 } // namespace webkit
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_surface_glx.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698