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

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

Issue 307813004: deprecate asImageInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add & 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
« 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/platform/graphics/test/MockDiscardablePixelRef.h
diff --git a/Source/platform/graphics/test/MockDiscardablePixelRef.h b/Source/platform/graphics/test/MockDiscardablePixelRef.h
index ec1b71f0346a5ce3e3d2d837d6a7066421350216..0e8c6f2060a0621c0b478a644c730f8523170469 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();
+ if (kUnknown_SkColorType == info.colorType())
return false;
- }
SkAutoTUnref<SkPixelRef> pr(new MockDiscardablePixelRef(info, dst->rowBytes()));
dst->setPixelRef(pr);
return 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