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

Unified Diff: Source/platform/graphics/ImageLayerChromiumTest.cpp

Issue 1008243003: Nuke NativeImageSkia -- new version. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add more WARN_UNUSED_RETURN goodness Created 5 years, 9 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 | « Source/platform/graphics/ImageBufferSurface.cpp ('k') | Source/platform/graphics/ImageSource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/ImageLayerChromiumTest.cpp
diff --git a/Source/platform/graphics/ImageLayerChromiumTest.cpp b/Source/platform/graphics/ImageLayerChromiumTest.cpp
index 974d4d8f9d807aeaeaa54cf5480673b8bd7c0d63..07a310527caec157d9c7a703c75a0f1aa6aad811 100644
--- a/Source/platform/graphics/ImageLayerChromiumTest.cpp
+++ b/Source/platform/graphics/ImageLayerChromiumTest.cpp
@@ -26,7 +26,6 @@
#include "platform/graphics/Image.h"
#include "platform/graphics/GraphicsLayer.h"
-#include "platform/graphics/skia/NativeImageSkia.h"
#include "wtf/PassOwnPtr.h"
#include <gtest/gtest.h>
@@ -53,10 +52,8 @@ public:
: Image(0)
, m_size(size)
{
- SkBitmap bitmap;
- bitmap.allocN32Pixels(size.width(), size.height(), isOpaque);
- bitmap.eraseColor(SK_ColorTRANSPARENT);
- m_nativeImage = NativeImageSkia::create(bitmap);
+ m_bitmap.allocN32Pixels(size.width(), size.height(), isOpaque);
+ m_bitmap.eraseColor(SK_ColorTRANSPARENT);
}
virtual bool isBitmapImage() const override
@@ -66,7 +63,7 @@ public:
virtual bool currentFrameKnownToBeOpaque() override
{
- return m_nativeImage->bitmap().isOpaque();
+ return m_bitmap.isOpaque();
}
virtual IntSize size() const override
@@ -74,12 +71,13 @@ public:
return m_size;
}
- virtual PassRefPtr<NativeImageSkia> nativeImageForCurrentFrame() override
+ virtual bool bitmapForCurrentFrame(SkBitmap* bitmap) override
{
if (m_size.isZero())
- return nullptr;
+ return false;
- return m_nativeImage;
+ *bitmap = m_bitmap;
+ return true;
}
// Stub implementations of pure virtual Image functions.
@@ -95,7 +93,7 @@ private:
IntSize m_size;
- RefPtr<NativeImageSkia> m_nativeImage;
+ SkBitmap m_bitmap;
};
class GraphicsLayerForTesting : public GraphicsLayer {
« no previous file with comments | « Source/platform/graphics/ImageBufferSurface.cpp ('k') | Source/platform/graphics/ImageSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698