| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 4612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4623 | 4623 |
| 4624 if (!image->currentFrameKnownToBeOpaque()) | 4624 if (!image->currentFrameKnownToBeOpaque()) |
| 4625 buf->canvas()->clear(SK_ColorTRANSPARENT); | 4625 buf->canvas()->clear(SK_ColorTRANSPARENT); |
| 4626 | 4626 |
| 4627 IntRect srcRect(IntPoint(), image->size()); | 4627 IntRect srcRect(IntPoint(), image->size()); |
| 4628 IntRect destRect(0, 0, size.width(), size.height()); | 4628 IntRect destRect(0, 0, size.width(), size.height()); |
| 4629 PaintFlags flags; | 4629 PaintFlags flags; |
| 4630 // TODO(ccameron): WebGL should produce sRGB images. | 4630 // TODO(ccameron): WebGL should produce sRGB images. |
| 4631 // https://crbug.com/672299 | 4631 // https://crbug.com/672299 |
| 4632 image->draw(buf->canvas(), flags, destRect, srcRect, | 4632 image->draw(buf->canvas(), flags, destRect, srcRect, |
| 4633 DoNotRespectImageOrientation, Image::DoNotClampImageToSourceRect, | 4633 DoNotRespectImageOrientation, Image::DoNotClampImageToSourceRect); |
| 4634 ColorBehavior::transformToGlobalTarget()); | |
| 4635 return buf->newImageSnapshot(PreferNoAcceleration, | 4634 return buf->newImageSnapshot(PreferNoAcceleration, |
| 4636 SnapshotReasonWebGLDrawImageIntoBuffer); | 4635 SnapshotReasonWebGLDrawImageIntoBuffer); |
| 4637 } | 4636 } |
| 4638 | 4637 |
| 4639 WebGLTexture* WebGLRenderingContextBase::validateTexImageBinding( | 4638 WebGLTexture* WebGLRenderingContextBase::validateTexImageBinding( |
| 4640 const char* funcName, | 4639 const char* funcName, |
| 4641 TexImageFunctionID functionID, | 4640 TexImageFunctionID functionID, |
| 4642 GLenum target) { | 4641 GLenum target) { |
| 4643 return validateTexture2DBinding(funcName, target); | 4642 return validateTexture2DBinding(funcName, target); |
| 4644 } | 4643 } |
| (...skipping 3195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7840 | 7839 |
| 7841 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( | 7840 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( |
| 7842 HTMLCanvasElementOrOffscreenCanvas& result) const { | 7841 HTMLCanvasElementOrOffscreenCanvas& result) const { |
| 7843 if (canvas()) | 7842 if (canvas()) |
| 7844 result.setHTMLCanvasElement(canvas()); | 7843 result.setHTMLCanvasElement(canvas()); |
| 7845 else | 7844 else |
| 7846 result.setOffscreenCanvas(offscreenCanvas()); | 7845 result.setOffscreenCanvas(offscreenCanvas()); |
| 7847 } | 7846 } |
| 7848 | 7847 |
| 7849 } // namespace blink | 7848 } // namespace blink |
| OLD | NEW |