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

Unified Diff: skia/ext/pixel_ref_utils.cc

Issue 1303033002: asABitmap is deprecated, switch over to (simpler) isABitmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « cc/raster/tile_task_worker_pool.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/pixel_ref_utils.cc
diff --git a/skia/ext/pixel_ref_utils.cc b/skia/ext/pixel_ref_utils.cc
index d7e2f7e62efa7f9cdc448a5d58a8b5b2c55a941a..cbd2ff26599eaa5eda8df9ab5f4bb1ed18984053 100644
--- a/skia/ext/pixel_ref_utils.cc
+++ b/skia/ext/pixel_ref_utils.cc
@@ -362,13 +362,7 @@ class GatherPixelRefDevice : public SkBitmapDevice {
bool GetBitmapFromPaint(const SkPaint& paint, SkBitmap* bm) {
SkShader* shader = paint.getShader();
- if (shader) {
- // Check whether the shader is a gradient in order to prevent generation
- // of bitmaps from gradient shaders, which implement asABitmap.
- if (SkShader::kNone_GradientType == shader->asAGradient(NULL))
- return shader->asABitmap(bm, NULL, NULL);
- }
- return false;
+ return shader && shader->isABitmap(bm, NULL, NULL);
}
};
« no previous file with comments | « cc/raster/tile_task_worker_pool.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698