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

Unified Diff: Source/platform/graphics/test/MockDiscardablePixelRef.h

Issue 302923003: stop calling deprecated asImageInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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/platform/graphics/test/MockDiscardablePixelRef.h
diff --git a/Source/platform/graphics/test/MockDiscardablePixelRef.h b/Source/platform/graphics/test/MockDiscardablePixelRef.h
index ec1b71f0346a5ce3e3d2d837d6a7066421350216..890f1ce41b4d1dadffcb2d7f3131cd126f779a34 100644
--- a/Source/platform/graphics/test/MockDiscardablePixelRef.h
+++ b/Source/platform/graphics/test/MockDiscardablePixelRef.h
@@ -51,10 +51,9 @@ public:
class Allocator : public SkBitmap::Allocator {
public:
virtual bool allocPixelRef(SkBitmap* dst, SkColorTable* ct) SK_OVERRIDE {
- SkImageInfo info;
- if (!dst->asImageInfo(&info)) {
+ const SkImageInfo info = dst->info();
f(malita) 2014/05/29 12:51:38 const SkImageInfo&
+ if (kUnknown_SkColorType == info.colorType())
return false;
- }
SkAutoTUnref<SkPixelRef> pr(new MockDiscardablePixelRef(info, dst->rowBytes()));
dst->setPixelRef(pr);
return true;

Powered by Google App Engine
This is Rietveld 408576698