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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp

Issue 1807103002: Move simple methods [A-E] from WebGraphicsContext3D to GLES2Interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@work
Patch Set: bindFoo: ALLthetests Created 4 years, 9 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "modules/webgl/WebGL2RenderingContextBase.h" 5 #include "modules/webgl/WebGL2RenderingContextBase.h"
6 6
7 #include "bindings/modules/v8/WebGLAny.h" 7 #include "bindings/modules/v8/WebGLAny.h"
8 #include "core/frame/ImageBitmap.h" 8 #include "core/frame/ImageBitmap.h"
9 #include "core/html/HTMLCanvasElement.h" 9 #include "core/html/HTMLCanvasElement.h"
10 #include "core/html/HTMLImageElement.h" 10 #include "core/html/HTMLImageElement.h"
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 case GL_STENCIL_INDEX8: 692 case GL_STENCIL_INDEX8:
693 if (!samples) { 693 if (!samples) {
694 webContext()->renderbufferStorage(target, internalformat, width, hei ght); 694 webContext()->renderbufferStorage(target, internalformat, width, hei ght);
695 } else { 695 } else {
696 GLint maxNumberOfSamples = 0; 696 GLint maxNumberOfSamples = 0;
697 webContext()->getInternalformativ(target, internalformat, GL_SAMPLES , 1, &maxNumberOfSamples); 697 webContext()->getInternalformativ(target, internalformat, GL_SAMPLES , 1, &maxNumberOfSamples);
698 if (samples > maxNumberOfSamples) { 698 if (samples > maxNumberOfSamples) {
699 synthesizeGLError(GL_INVALID_OPERATION, functionName, "samples o ut of range"); 699 synthesizeGLError(GL_INVALID_OPERATION, functionName, "samples o ut of range");
700 return; 700 return;
701 } 701 }
702 webContext()->renderbufferStorageMultisampleCHROMIUM( 702 contextGL()->RenderbufferStorageMultisampleCHROMIUM(
703 target, samples, internalformat, width, height); 703 target, samples, internalformat, width, height);
704 } 704 }
705 break; 705 break;
706 case GL_DEPTH_STENCIL: 706 case GL_DEPTH_STENCIL:
707 // To be WebGL 1 backward compatible. 707 // To be WebGL 1 backward compatible.
708 if (samples > 0) { 708 if (samples > 0) {
709 synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid internalfo rmat"); 709 synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid internalfo rmat");
710 return; 710 return;
711 } 711 }
712 webContext()->renderbufferStorage(target, GL_DEPTH24_STENCIL8, width, he ight); 712 webContext()->renderbufferStorage(target, GL_DEPTH24_STENCIL8, width, he ight);
(...skipping 2879 matching lines...) Expand 10 before | Expand all | Expand 10 after
3592 params.skipPixels = m_unpackSkipPixels; 3592 params.skipPixels = m_unpackSkipPixels;
3593 params.skipRows = m_unpackSkipRows; 3593 params.skipRows = m_unpackSkipRows;
3594 if (dimension == Tex3D) { 3594 if (dimension == Tex3D) {
3595 params.imageHeight = m_unpackImageHeight; 3595 params.imageHeight = m_unpackImageHeight;
3596 params.skipImages = m_unpackSkipImages; 3596 params.skipImages = m_unpackSkipImages;
3597 } 3597 }
3598 return params; 3598 return params;
3599 } 3599 }
3600 3600
3601 } // namespace blink 3601 } // namespace blink
OLDNEW
« no previous file with comments | « gpu/blink/webgraphicscontext3d_impl.cc ('k') | third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698