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 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 drawingBuffer()->commit(); | 975 drawingBuffer()->commit(); |
976 if (!canvas()->buffer()->copyRenderingResultsFromDrawingBuffer(drawingBuffer
(), sourceBuffer)) { | 976 if (!canvas()->buffer()->copyRenderingResultsFromDrawingBuffer(drawingBuffer
(), sourceBuffer)) { |
977 canvas()->ensureUnacceleratedImageBuffer(); | 977 canvas()->ensureUnacceleratedImageBuffer(); |
978 if (canvas()->hasImageBuffer()) | 978 if (canvas()->hasImageBuffer()) |
979 drawingBuffer()->paintRenderingResultsToCanvas(canvas()->buffer()); | 979 drawingBuffer()->paintRenderingResultsToCanvas(canvas()->buffer()); |
980 } | 980 } |
981 | 981 |
982 return true; | 982 return true; |
983 } | 983 } |
984 | 984 |
985 PassRefPtrWillBeRawPtr<ImageData> WebGLRenderingContextBase::paintRenderingResul
tsToImageData(SourceDrawingBuffer sourceBuffer) | 985 ImageData* WebGLRenderingContextBase::paintRenderingResultsToImageData(SourceDra
wingBuffer sourceBuffer) |
986 { | 986 { |
987 if (isContextLost()) | 987 if (isContextLost()) |
988 return nullptr; | 988 return nullptr; |
989 if (m_requestedAttributes.premultipliedAlpha()) | 989 if (m_requestedAttributes.premultipliedAlpha()) |
990 return nullptr; | 990 return nullptr; |
991 | 991 |
992 clearIfComposited(); | 992 clearIfComposited(); |
993 drawingBuffer()->commit(); | 993 drawingBuffer()->commit(); |
994 ScopedFramebufferRestorer restorer(this); | 994 ScopedFramebufferRestorer restorer(this); |
995 int width, height; | 995 int width, height; |
(...skipping 5195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6191 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; | 6191 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; |
6192 } | 6192 } |
6193 #else | 6193 #else |
6194 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 6194 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
6195 { | 6195 { |
6196 return m_drawingBuffer.get(); | 6196 return m_drawingBuffer.get(); |
6197 } | 6197 } |
6198 #endif | 6198 #endif |
6199 | 6199 |
6200 } // namespace blink | 6200 } // namespace blink |
OLD | NEW |