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

Unified Diff: ui/gfx/render_text.cc

Issue 9588003: browser: Minor changes to use SkPoint::iset() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | « chrome/browser/ui/views/tabs/tab.cc ('k') | ui/views/controls/glow_hover_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.cc
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index 2ce62791b03aabd4c69556f86e36548df69ce301..35134e8ac5daae44a934da4df3a6472379c69107 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -140,10 +140,6 @@ SkShader* CreateFadeShader(const gfx::Rect& text_rect,
SkColor color) {
// Fade alpha of 51/255 corresponds to a fade of 0.2 of the original color.
const SkColor fade_color = SkColorSetA(color, 51);
- const SkPoint points[2] = {
- SkPoint::Make(text_rect.x(), text_rect.y()),
- SkPoint::Make(text_rect.right(), text_rect.y())
- };
std::vector<SkScalar> positions;
std::vector<SkColor> colors;
@@ -161,12 +157,14 @@ SkShader* CreateFadeShader(const gfx::Rect& text_rect,
colors.push_back(colors.back());
}
+ SkPoint points[2];
+ points[0].iset(text_rect.x(), text_rect.y());
+ points[1].iset(text_rect.right(), text_rect.y());
+
return SkGradientShader::CreateLinear(&points[0], &colors[0], &positions[0],
- colors.size(),
- SkShader::kClamp_TileMode);
+ colors.size(), SkShader::kClamp_TileMode);
}
-
} // namespace
namespace gfx {
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | ui/views/controls/glow_hover_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698