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

Unified Diff: Source/web/tests/DeferredImageDecoderTest.cpp

Issue 105003005: Revert of Teach Skia to use discardable memory (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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 | « Source/platform/graphics/ImageFrameGenerator.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/DeferredImageDecoderTest.cpp
diff --git a/Source/web/tests/DeferredImageDecoderTest.cpp b/Source/web/tests/DeferredImageDecoderTest.cpp
index fc35db28192c3e19a0895be036214e2def36f04d..29c0e3ec732f1cbef384338365d8d84807cd5eb0 100644
--- a/Source/web/tests/DeferredImageDecoderTest.cpp
+++ b/Source/web/tests/DeferredImageDecoderTest.cpp
@@ -176,34 +176,6 @@
EXPECT_EQ(SkColorSetARGB(255, 255, 255, 255), canvasBitmap.getColor(0, 0));
}
-TEST_F(DeferredImageDecoderTest, drawDiscardableIntoSkPicture)
-{
- DeferredImageDecoder::setSkiaDiscardableMemoryEnabled(true);
-
- m_lazyDecoder->setData(m_data.get(), true);
- RefPtr<NativeImageSkia> image = m_lazyDecoder->frameBufferAtIndex(0)->asNewNativeImage();
- EXPECT_EQ(1, image->bitmap().width());
- EXPECT_EQ(1, image->bitmap().height());
- EXPECT_FALSE(image->bitmap().isNull());
- EXPECT_TRUE(image->bitmap().isImmutable());
-
- SkCanvas* tempCanvas = m_picture.beginRecording(100, 100);
- tempCanvas->drawBitmap(image->bitmap(), 0, 0);
- m_picture.endRecording();
- EXPECT_EQ(0, m_frameBufferRequestCount);
-
- m_canvas->drawPicture(m_picture);
- EXPECT_EQ(0, m_frameBufferRequestCount);
-
- SkBitmap canvasBitmap;
- canvasBitmap.setConfig(SkBitmap::kARGB_8888_Config, 100, 100);
- ASSERT_TRUE(m_canvas->readPixels(&canvasBitmap, 0, 0));
- SkAutoLockPixels autoLock(canvasBitmap);
- EXPECT_EQ(SkColorSetARGB(255, 255, 255, 255), canvasBitmap.getColor(0, 0));
-
- DeferredImageDecoder::setSkiaDiscardableMemoryEnabled(false);
-}
-
TEST_F(DeferredImageDecoderTest, DISABLED_drawScaledIntoSkPicture)
{
m_lazyDecoder->setData(m_data.get(), true);
« no previous file with comments | « Source/platform/graphics/ImageFrameGenerator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698