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

Side by Side Diff: chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc

Issue 6369016: Add GL_CHROMIUM_framebuffer_multisample support to Chromium's... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/renderer/webgraphicscontext3d_command_buffer_impl.h" 7 #include "chrome/renderer/webgraphicscontext3d_command_buffer_impl.h"
8 8
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #ifndef GL_GLEXT_PROTOTYPES 10 #ifndef GL_GLEXT_PROTOTYPES
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 WebKit::WebString WebGraphicsContext3DCommandBufferImpl:: 380 WebKit::WebString WebGraphicsContext3DCommandBufferImpl::
381 getRequestableExtensionsCHROMIUM() { 381 getRequestableExtensionsCHROMIUM() {
382 return WebKit::WebString::fromUTF8(glGetRequestableExtensionsCHROMIUM()); 382 return WebKit::WebString::fromUTF8(glGetRequestableExtensionsCHROMIUM());
383 } 383 }
384 384
385 void WebGraphicsContext3DCommandBufferImpl::requestExtensionCHROMIUM( 385 void WebGraphicsContext3DCommandBufferImpl::requestExtensionCHROMIUM(
386 const char* extension) { 386 const char* extension) {
387 glRequestExtensionCHROMIUM(extension); 387 glRequestExtensionCHROMIUM(extension);
388 } 388 }
389 389
390 void WebGraphicsContext3DCommandBufferImpl::blitFramebufferCHROMIUM(
391 int srcX0, int srcY0, int srcX1, int srcY1,
392 int dstX0, int dstY0, int dstX1, int dstY1,
393 unsigned mask, unsigned filter) {
394 glBlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1,
395 dstX0, dstY0, dstX1, dstY1,
396 mask, filter);
397 }
398
399 void WebGraphicsContext3DCommandBufferImpl::
400 renderbufferStorageMultisampleCHROMIUM(
401 unsigned long target, int samples, unsigned internalformat,
402 unsigned width, unsigned height) {
403 glRenderbufferStorageMultisampleEXT(target, samples, internalformat,
404 width, height);
405 }
406
390 // Helper macros to reduce the amount of code. 407 // Helper macros to reduce the amount of code.
391 408
392 #define DELEGATE_TO_GL(name, glname) \ 409 #define DELEGATE_TO_GL(name, glname) \
393 void WebGraphicsContext3DCommandBufferImpl::name() { \ 410 void WebGraphicsContext3DCommandBufferImpl::name() { \
394 makeContextCurrent(); \ 411 makeContextCurrent(); \
395 gl##glname(); \ 412 gl##glname(); \
396 } 413 }
397 414
398 #define DELEGATE_TO_GL_1(name, glname, t1) \ 415 #define DELEGATE_TO_GL_1(name, glname, t1) \
399 void WebGraphicsContext3DCommandBufferImpl::name(t1 a1) { \ 416 void WebGraphicsContext3DCommandBufferImpl::name(t1 a1) { \
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 1053
1037 void WebGraphicsContext3DCommandBufferImpl::OnSwapBuffers() { 1054 void WebGraphicsContext3DCommandBufferImpl::OnSwapBuffers() {
1038 // This may be called after tear-down of the RenderView. 1055 // This may be called after tear-down of the RenderView.
1039 RenderView* renderview = 1056 RenderView* renderview =
1040 web_view_ ? RenderView::FromWebView(web_view_) : NULL; 1057 web_view_ ? RenderView::FromWebView(web_view_) : NULL;
1041 if (renderview) 1058 if (renderview)
1042 renderview->DidFlushPaint(); 1059 renderview->DidFlushPaint();
1043 } 1060 }
1044 1061
1045 #endif // defined(ENABLE_GPU) 1062 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « chrome/renderer/webgraphicscontext3d_command_buffer_impl.h ('k') | webkit/gpu/webgraphicscontext3d_in_process_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698