summaryrefslogtreecommitdiffstats
path: root/cc/test/skia_common.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/test/skia_common.cc')
-rw-r--r--cc/test/skia_common.cc35
1 files changed, 4 insertions, 31 deletions
diff --git a/cc/test/skia_common.cc b/cc/test/skia_common.cc
index d8d61a8..de2733d 100644
--- a/cc/test/skia_common.cc
+++ b/cc/test/skia_common.cc
@@ -31,33 +31,6 @@ SkPixelRef* TestPixelRef::deepCopy(
}
-TestLazyPixelRef::TestLazyPixelRef(const SkImageInfo& info)
- : skia::LazyPixelRef(info),
- pixels_(new char[4 * info.fWidth * info.fHeight]) {}
-
-TestLazyPixelRef::~TestLazyPixelRef() {}
-
-SkFlattenable::Factory TestLazyPixelRef::getFactory() const { return NULL; }
-
-void* TestLazyPixelRef::onLockPixels(SkColorTable** color_table) {
- return pixels_.get();
-}
-
-bool TestLazyPixelRef::PrepareToDecode(const PrepareParams& params) {
- return true;
-}
-
-bool TestLazyPixelRef::MaybeDecoded() {
- return true;
-}
-
-SkPixelRef* TestLazyPixelRef::deepCopy(
- SkBitmap::Config config,
- const SkIRect* subset) {
- this->ref();
- return this;
-}
-
void DrawPicture(unsigned char* buffer,
gfx::Rect layer_rect,
scoped_refptr<Picture> picture) {
@@ -80,12 +53,12 @@ void CreateBitmap(gfx::Size size, const char* uri, SkBitmap* bitmap) {
kPremul_SkAlphaType
};
- skia::RefPtr<TestLazyPixelRef> lazy_pixel_ref =
- skia::AdoptRef(new TestLazyPixelRef(info));
- lazy_pixel_ref->setURI(uri);
+ skia::RefPtr<TestPixelRef> pixel_ref =
+ skia::AdoptRef(new TestPixelRef(info));
+ pixel_ref->setURI(uri);
bitmap->setConfig(info);
- bitmap->setPixelRef(lazy_pixel_ref.get());
+ bitmap->setPixelRef(pixel_ref.get());
}