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

Unified Diff: cc/layers/painted_scrollbar_layer.cc

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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/layers/layer.cc ('k') | cc/layers/painted_scrollbar_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/painted_scrollbar_layer.cc
diff --git a/cc/layers/painted_scrollbar_layer.cc b/cc/layers/painted_scrollbar_layer.cc
index 164a75eef5bea2abb857fc66ec083dcff0874d6e..63b0b3eb831648eaad82cfe0b04d1e3a1ea3e2e0 100644
--- a/cc/layers/painted_scrollbar_layer.cc
+++ b/cc/layers/painted_scrollbar_layer.cc
@@ -263,26 +263,25 @@ UIResourceBitmap PaintedScrollbarLayer::RasterizeScrollbarPart(
SkBitmap skbitmap;
skbitmap.allocN32Pixels(content_rect.width(), content_rect.height());
- SkCanvas skcanvas(skbitmap);
+ CdlCanvas canvas(skbitmap);
float scale_x =
content_rect.width() / static_cast<float>(layer_rect.width());
float scale_y =
content_rect.height() / static_cast<float>(layer_rect.height());
- skcanvas.scale(SkFloatToScalar(scale_x),
- SkFloatToScalar(scale_y));
- skcanvas.translate(SkFloatToScalar(-layer_rect.x()),
- SkFloatToScalar(-layer_rect.y()));
+ canvas.scale(SkFloatToScalar(scale_x), SkFloatToScalar(scale_y));
+ canvas.translate(SkFloatToScalar(-layer_rect.x()),
+ SkFloatToScalar(-layer_rect.y()));
SkRect layer_skrect = RectToSkRect(layer_rect);
- SkPaint paint;
+ CdlPaint paint;
paint.setAntiAlias(false);
paint.setBlendMode(SkBlendMode::kClear);
- skcanvas.drawRect(layer_skrect, paint);
- skcanvas.clipRect(layer_skrect);
+ canvas.drawRect(layer_skrect, paint);
+ canvas.clipRect(layer_skrect);
- scrollbar_->PaintPart(&skcanvas, part, layer_rect);
+ scrollbar_->PaintPart(&canvas, part, layer_rect);
// Make sure that the pixels are no longer mutable to unavoid unnecessary
// allocation and copying.
skbitmap.setImmutable();
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/painted_scrollbar_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698