| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |