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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 GLint src_y1, | 418 GLint src_y1, |
419 GLint dst_x0, | 419 GLint dst_x0, |
420 GLint dst_y0, | 420 GLint dst_y0, |
421 GLint dst_x1, | 421 GLint dst_x1, |
422 GLint dst_y1, | 422 GLint dst_y1, |
423 GLbitfield mask, | 423 GLbitfield mask, |
424 GLenum filter) { | 424 GLenum filter) { |
425 if (isContextLost()) | 425 if (isContextLost()) |
426 return; | 426 return; |
427 | 427 |
| 428 DrawingBuffer::ScopedRGBEmulationForBlitFramebuffer emulation( |
| 429 GetDrawingBuffer()); |
428 ContextGL()->BlitFramebufferCHROMIUM(src_x0, src_y0, src_x1, src_y1, dst_x0, | 430 ContextGL()->BlitFramebufferCHROMIUM(src_x0, src_y0, src_x1, src_y1, dst_x0, |
429 dst_y0, dst_x1, dst_y1, mask, filter); | 431 dst_y0, dst_x1, dst_y1, mask, filter); |
430 } | 432 } |
431 | 433 |
432 bool WebGL2RenderingContextBase::ValidateTexFuncLayer(const char* function_name, | 434 bool WebGL2RenderingContextBase::ValidateTexFuncLayer(const char* function_name, |
433 GLenum tex_target, | 435 GLenum tex_target, |
434 GLint layer) { | 436 GLint layer) { |
435 if (layer < 0) { | 437 if (layer < 0) { |
436 SynthesizeGLError(GL_INVALID_VALUE, function_name, "layer out of range"); | 438 SynthesizeGLError(GL_INVALID_VALUE, function_name, "layer out of range"); |
437 return false; | 439 return false; |
(...skipping 5319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5757 | 5759 |
5758 void WebGL2RenderingContextBase:: | 5760 void WebGL2RenderingContextBase:: |
5759 DrawingBufferClientRestorePixelUnpackBufferBinding() { | 5761 DrawingBufferClientRestorePixelUnpackBufferBinding() { |
5760 if (!ContextGL()) | 5762 if (!ContextGL()) |
5761 return; | 5763 return; |
5762 ContextGL()->BindBuffer(GL_PIXEL_UNPACK_BUFFER, | 5764 ContextGL()->BindBuffer(GL_PIXEL_UNPACK_BUFFER, |
5763 ObjectOrZero(bound_pixel_unpack_buffer_.Get())); | 5765 ObjectOrZero(bound_pixel_unpack_buffer_.Get())); |
5764 } | 5766 } |
5765 | 5767 |
5766 } // namespace blink | 5768 } // namespace blink |
OLD | NEW |