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

Unified Diff: chrome/browser/views/sad_tab_view.cc

Issue 12842: Move convolver, image_operations, and skia_utils from base/gfx to skia/ext.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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/views/options/options_group_view.cc ('k') | chrome/browser/views/tabs/tab_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/sad_tab_view.cc
===================================================================
--- chrome/browser/views/sad_tab_view.cc (revision 6142)
+++ chrome/browser/views/sad_tab_view.cc (working copy)
@@ -10,6 +10,7 @@
#include "chrome/common/l10n_util.h"
#include "chrome/common/resource_bundle.h"
#include "generated_resources.h"
+#include "skia/ext/skia_utils.h"
#include "skia/include/SkGradientShader.h"
static const int kSadTabOffset = -64;
@@ -34,17 +35,9 @@
InitClass();
}
-static SkShader* CreateGradientShader(int end_point) {
- SkColor grad_colors[2] = { kBackgroundColor, kBackgroundEndColor };
- SkPoint grad_points[2];
- grad_points[0].set(SkIntToScalar(0), SkIntToScalar(0));
- grad_points[1].set(SkIntToScalar(0), SkIntToScalar(end_point));
- return SkGradientShader::CreateLinear(
- grad_points, grad_colors, NULL, 2, SkShader::kRepeat_TileMode);
-}
-
void SadTabView::Paint(ChromeCanvas* canvas) {
- SkShader* background_shader = CreateGradientShader(height());
+ SkShader* background_shader = skia::CreateGradientShader(
+ 0, height(), kBackgroundColor, kBackgroundEndColor);
SkPaint paint;
paint.setShader(background_shader);
background_shader->unref();
« no previous file with comments | « chrome/browser/views/options/options_group_view.cc ('k') | chrome/browser/views/tabs/tab_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698