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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 1889153003: Remove ImageData::dispose() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reverted Handle.h Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/ImageData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
index f2a50965cb56c90e9053189173815547399d28ba..8af725fcf1c1ad8af0811a11d5f2d6a99eed5ba0 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -599,7 +599,6 @@ String HTMLCanvasElement::toDataURLInternal(const String& mimeType, const double
String encodingMimeType = toEncodingMimeType(mimeType, EncodeReasonToDataURL);
ImageData* imageData = toImageData(sourceBuffer, SnapshotReasonToDataURL);
- ScopedDisposal<ImageData> disposer(imageData);
return ImageDataBuffer(imageData->size(), imageData->data()->data()).toDataURL(encodingMimeType, quality);
}
@@ -644,8 +643,7 @@ void HTMLCanvasElement::toBlob(BlobCallback* callback, const String& mimeType, c
String encodingMimeType = toEncodingMimeType(mimeType, EncodeReasonToBlobCallback);
ImageData* imageData = toImageData(BackBuffer, SnapshotReasonToBlob);
- // imageData unref its data, which we still keep alive for the async toBlob thread
- ScopedDisposal<ImageData> disposer(imageData);
+
CanvasAsyncBlobCreator* asyncCreator = CanvasAsyncBlobCreator::create(imageData->data(), encodingMimeType, imageData->size(), callback);
if (encodingMimeType == DefaultMimeType)
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/ImageData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698