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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.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 | « chrome/browser/ui/views/tabs/tab.cc ('k') | chrome/browser/ui/views/toolbar/app_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab_strip.cc
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 69f4cda0daed1eb429f61102094223636442e00a..86a8787d5e024d9c98127b5a31c1671427e4ba07 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -36,6 +36,7 @@
#include "chrome/grit/theme_resources.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/common/content_switches.h"
+#include "skia/ext/cdl_paint.h"
#include "third_party/skia/include/core/SkColorFilter.h"
#include "third_party/skia/include/effects/SkBlurMaskFilter.h"
#include "third_party/skia/include/effects/SkLayerDrawLooper.h"
@@ -401,7 +402,7 @@ void NewTabButton::OnPaint(gfx::Canvas* canvas) {
canvas->sk_canvas()->clipPath(fill, SkRegion::kDifference_Op, true);
// Now draw the stroke and shadow; the stroke will always be visible, while
// the shadow will be affected by the clip we set above.
- SkPaint paint;
+ CdlPaint paint;
paint.setAntiAlias(true);
const SkColor stroke_color = tab_strip_->GetToolbarTopSeparatorColor();
const float alpha = SkColorGetA(stroke_color);
@@ -471,7 +472,7 @@ void NewTabButton::PaintFill(bool pressed,
gfx::Canvas* canvas) const {
gfx::ScopedCanvas scoped_canvas(canvas);
canvas->UndoDeviceScaleFactor();
- SkPaint paint;
+ CdlPaint paint;
paint.setAntiAlias(true);
// For unpressed buttons, draw the fill and its shadow.
@@ -509,7 +510,7 @@ void NewTabButton::PaintFill(bool pressed,
const SkColor stroke_color = tab_strip_->GetToolbarTopSeparatorColor();
const SkAlpha alpha = static_cast<SkAlpha>(
std::round(SkColorGetA(stroke_color) * 0.59375f));
- SkPaint shadow_paint = paint;
+ CdlPaint shadow_paint = paint;
shadow_paint.setLooper(
CreateShadowDrawLooper(SkColorSetA(stroke_color, alpha)));
canvas->DrawPath(fill, shadow_paint);
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | chrome/browser/ui/views/toolbar/app_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698