Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: Source/core/html/canvas/WebGLRenderingContextBase.cpp

Issue 1084313004: Oilpan: keep ImageData on the heap by default. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ensure timely disposal of temporary ImageData buffers Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/canvas/WebGLRenderingContextBase.h ('k') | Source/platform/heap/Handle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/html/canvas/WebGLRenderingContextBase.h ('k') | Source/platform/heap/Handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698