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

Unified Diff: Source/core/html/canvas/CanvasRenderingContext2DAPITest.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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/canvas/CanvasRenderingContext2DAPITest.cpp
diff --git a/Source/core/html/canvas/CanvasRenderingContext2DAPITest.cpp b/Source/core/html/canvas/CanvasRenderingContext2DAPITest.cpp
index 29b84da5dd94b37ec1229e5b97dd6a5db64c8346..0c1e77379db3fad492c99710f4cf5b15866a42b4 100644
--- a/Source/core/html/canvas/CanvasRenderingContext2DAPITest.cpp
+++ b/Source/core/html/canvas/CanvasRenderingContext2DAPITest.cpp
@@ -184,7 +184,7 @@ TEST_F(CanvasRenderingContext2DAPITest, CreateImageData)
NonThrowableExceptionState exceptionState;
// create a 100x50 imagedata and fill it with white pixels
- RefPtrWillBeRawPtr<ImageData> imageData = context2d()->createImageData(100, 50, exceptionState);
+ ImageData* imageData = context2d()->createImageData(100, 50, exceptionState);
EXPECT_FALSE(exceptionState.hadException());
EXPECT_EQ(100, imageData->width());
EXPECT_EQ(50, imageData->height());
@@ -197,20 +197,20 @@ TEST_F(CanvasRenderingContext2DAPITest, CreateImageData)
// createImageData(imageData) should create a new ImageData of the same size as 'imageData'
// but filled with transparent black
- RefPtrWillBeRawPtr<ImageData> sameSizeImageData = context2d()->createImageData(imageData);
+ ImageData* sameSizeImageData = context2d()->createImageData(imageData);
EXPECT_EQ(100, sameSizeImageData->width());
EXPECT_EQ(50, sameSizeImageData->height());
EXPECT_EQ(0, sameSizeImageData->data()->data()[32]);
// createImageData(width, height) takes the absolute magnitude of the size arguments
- RefPtrWillBeRawPtr<ImageData> imgdata1 = context2d()->createImageData(10, 20, exceptionState);
+ ImageData* imgdata1 = context2d()->createImageData(10, 20, exceptionState);
EXPECT_FALSE(exceptionState.hadException());
- RefPtrWillBeRawPtr<ImageData> imgdata2 = context2d()->createImageData(-10, 20, exceptionState);
+ ImageData* imgdata2 = context2d()->createImageData(-10, 20, exceptionState);
EXPECT_FALSE(exceptionState.hadException());
- RefPtrWillBeRawPtr<ImageData> imgdata3 = context2d()->createImageData(10, -20, exceptionState);
+ ImageData* imgdata3 = context2d()->createImageData(10, -20, exceptionState);
EXPECT_FALSE(exceptionState.hadException());
- RefPtrWillBeRawPtr<ImageData> imgdata4 = context2d()->createImageData(-10, -20, exceptionState);
+ ImageData* imgdata4 = context2d()->createImageData(-10, -20, exceptionState);
EXPECT_FALSE(exceptionState.hadException());
EXPECT_EQ((unsigned)800, imgdata1->data()->length());
« no previous file with comments | « Source/core/html/canvas/CanvasRenderingContext2D.cpp ('k') | Source/core/html/canvas/CanvasRenderingContext2DTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698