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

Unified Diff: src/views/SkWidgets.cpp

Issue 168843002: use SkColorType instead of SkBitmap::Config in views/effects (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | « src/utils/mac/SkCreateCGImageRef.cpp ('k') | src/views/SkWindow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/views/SkWidgets.cpp
diff --git a/src/views/SkWidgets.cpp b/src/views/SkWidgets.cpp
index e4547ec0e60892bef5394157b0ead8fc10857660..fb16f1ec0d82b8c992ffea5b9d360107e61d721a 100644
--- a/src/views/SkWidgets.cpp
+++ b/src/views/SkWidgets.cpp
@@ -507,7 +507,7 @@ bool SkBitmapView::getBitmap(SkBitmap* bitmap) const
{
if (bitmap)
*bitmap = fBitmap;
- return fBitmap.getConfig() != SkBitmap::kNo_Config;
+ return fBitmap.colorType() != kUnknown_SkColorType;
}
void SkBitmapView::setBitmap(const SkBitmap* bitmap, bool viewOwnsPixels)
@@ -534,7 +534,7 @@ bool SkBitmapView::loadBitmapFromFile(const char path[])
void SkBitmapView::onDraw(SkCanvas* canvas)
{
- if (fBitmap.getConfig() != SkBitmap::kNo_Config &&
+ if (fBitmap.colorType() != kUnknown_SkColorType &&
fBitmap.width() && fBitmap.height())
{
SkAutoCanvasRestore restore(canvas, true);
« no previous file with comments | « src/utils/mac/SkCreateCGImageRef.cpp ('k') | src/views/SkWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698