| 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 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 drawingBuffer()->commit(); | 974 drawingBuffer()->commit(); |
| 975 if (!canvas()->buffer()->copyRenderingResultsFromDrawingBuffer(drawingBuffer
(), sourceBuffer)) { | 975 if (!canvas()->buffer()->copyRenderingResultsFromDrawingBuffer(drawingBuffer
(), sourceBuffer)) { |
| 976 canvas()->ensureUnacceleratedImageBuffer(); | 976 canvas()->ensureUnacceleratedImageBuffer(); |
| 977 if (canvas()->hasImageBuffer()) | 977 if (canvas()->hasImageBuffer()) |
| 978 drawingBuffer()->paintRenderingResultsToCanvas(canvas()->buffer()); | 978 drawingBuffer()->paintRenderingResultsToCanvas(canvas()->buffer()); |
| 979 } | 979 } |
| 980 | 980 |
| 981 return true; | 981 return true; |
| 982 } | 982 } |
| 983 | 983 |
| 984 PassRefPtrWillBeRawPtr<ImageData> WebGLRenderingContextBase::paintRenderingResul
tsToImageData(SourceDrawingBuffer sourceBuffer) | 984 ImageData* WebGLRenderingContextBase::paintRenderingResultsToImageData(SourceDra
wingBuffer sourceBuffer) |
| 985 { | 985 { |
| 986 if (isContextLost()) | 986 if (isContextLost()) |
| 987 return nullptr; | 987 return nullptr; |
| 988 if (m_requestedAttributes.premultipliedAlpha()) | 988 if (m_requestedAttributes.premultipliedAlpha()) |
| 989 return nullptr; | 989 return nullptr; |
| 990 | 990 |
| 991 clearIfComposited(); | 991 clearIfComposited(); |
| 992 drawingBuffer()->commit(); | 992 drawingBuffer()->commit(); |
| 993 ScopedFramebufferRestorer restorer(this); | 993 ScopedFramebufferRestorer restorer(this); |
| 994 int width, height; | 994 int width, height; |
| (...skipping 5098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6093 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; | 6093 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; |
| 6094 } | 6094 } |
| 6095 #else | 6095 #else |
| 6096 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 6096 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
| 6097 { | 6097 { |
| 6098 return m_drawingBuffer.get(); | 6098 return m_drawingBuffer.get(); |
| 6099 } | 6099 } |
| 6100 #endif | 6100 #endif |
| 6101 | 6101 |
| 6102 } // namespace blink | 6102 } // namespace blink |
| OLD | NEW |