| 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 <memory> | 7 #include <memory> |
| 8 #include "bindings/modules/v8/WebGLAny.h" | 8 #include "bindings/modules/v8/WebGLAny.h" |
| 9 #include "core/frame/ImageBitmap.h" | 9 #include "core/frame/ImageBitmap.h" |
| 10 #include "core/html/HTMLCanvasElement.h" | 10 #include "core/html/HTMLCanvasElement.h" |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 GLint src_y1, | 419 GLint src_y1, |
| 420 GLint dst_x0, | 420 GLint dst_x0, |
| 421 GLint dst_y0, | 421 GLint dst_y0, |
| 422 GLint dst_x1, | 422 GLint dst_x1, |
| 423 GLint dst_y1, | 423 GLint dst_y1, |
| 424 GLbitfield mask, | 424 GLbitfield mask, |
| 425 GLenum filter) { | 425 GLenum filter) { |
| 426 if (isContextLost()) | 426 if (isContextLost()) |
| 427 return; | 427 return; |
| 428 | 428 |
| 429 DrawingBuffer::ScopedRGBEmulationForBlitFramebuffer emulation( |
| 430 GetDrawingBuffer()); |
| 429 ContextGL()->BlitFramebufferCHROMIUM(src_x0, src_y0, src_x1, src_y1, dst_x0, | 431 ContextGL()->BlitFramebufferCHROMIUM(src_x0, src_y0, src_x1, src_y1, dst_x0, |
| 430 dst_y0, dst_x1, dst_y1, mask, filter); | 432 dst_y0, dst_x1, dst_y1, mask, filter); |
| 431 } | 433 } |
| 432 | 434 |
| 433 bool WebGL2RenderingContextBase::ValidateTexFuncLayer(const char* function_name, | 435 bool WebGL2RenderingContextBase::ValidateTexFuncLayer(const char* function_name, |
| 434 GLenum tex_target, | 436 GLenum tex_target, |
| 435 GLint layer) { | 437 GLint layer) { |
| 436 if (layer < 0) { | 438 if (layer < 0) { |
| 437 SynthesizeGLError(GL_INVALID_VALUE, function_name, "layer out of range"); | 439 SynthesizeGLError(GL_INVALID_VALUE, function_name, "layer out of range"); |
| 438 return false; | 440 return false; |
| (...skipping 5326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5765 | 5767 |
| 5766 void WebGL2RenderingContextBase:: | 5768 void WebGL2RenderingContextBase:: |
| 5767 DrawingBufferClientRestorePixelUnpackBufferBinding() { | 5769 DrawingBufferClientRestorePixelUnpackBufferBinding() { |
| 5768 if (!ContextGL()) | 5770 if (!ContextGL()) |
| 5769 return; | 5771 return; |
| 5770 ContextGL()->BindBuffer(GL_PIXEL_UNPACK_BUFFER, | 5772 ContextGL()->BindBuffer(GL_PIXEL_UNPACK_BUFFER, |
| 5771 ObjectOrZero(bound_pixel_unpack_buffer_.Get())); | 5773 ObjectOrZero(bound_pixel_unpack_buffer_.Get())); |
| 5772 } | 5774 } |
| 5773 | 5775 |
| 5774 } // namespace blink | 5776 } // namespace blink |
| OLD | NEW |