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

Side by Side Diff: chrome/browser/ui/gtk/gtk_theme_service.cc

Issue 8681001: Revert 111288 - Possibly broke media_unittests on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 6 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 SkColor lighter = gradient_top_color ? GdkToSkColor(gradient_top_color) 1065 SkColor lighter = gradient_top_color ? GdkToSkColor(gradient_top_color)
1066 : color_utils::HSLShift(base, kGtkFrameShift); 1066 : color_utils::HSLShift(base, kGtkFrameShift);
1067 SkShader* shader = gfx::CreateGradientShader( 1067 SkShader* shader = gfx::CreateGradientShader(
1068 0, gradient_size, lighter, base); 1068 0, gradient_size, lighter, base);
1069 SkPaint paint; 1069 SkPaint paint;
1070 paint.setStyle(SkPaint::kFill_Style); 1070 paint.setStyle(SkPaint::kFill_Style);
1071 paint.setAntiAlias(true); 1071 paint.setAntiAlias(true);
1072 paint.setShader(shader); 1072 paint.setShader(shader);
1073 shader->unref(); 1073 shader->unref();
1074 1074
1075 canvas.DrawRect(gfx::Rect(0, 0, kToolbarImageWidth, gradient_size), paint); 1075 canvas.DrawRectInt(0, 0, kToolbarImageWidth, gradient_size, paint);
1076 } 1076 }
1077 1077
1078 canvas.FillRect(base, gfx::Rect(0, gradient_size, kToolbarImageWidth, 1078 canvas.FillRect(base, gfx::Rect(0, gradient_size,
1079 kToolbarImageWidth,
1079 kToolbarImageHeight - gradient_size)); 1080 kToolbarImageHeight - gradient_size));
1080 return new SkBitmap(canvas.ExtractBitmap()); 1081 return new SkBitmap(canvas.ExtractBitmap());
1081 } 1082 }
1082 1083
1083 SkBitmap* GtkThemeService::GenerateTabImage(int base_id) const { 1084 SkBitmap* GtkThemeService::GenerateTabImage(int base_id) const {
1084 SkBitmap* base_image = GetBitmapNamed(base_id); 1085 SkBitmap* base_image = GetBitmapNamed(base_id);
1085 SkBitmap bg_tint = SkBitmapOperations::CreateHSLShiftedBitmap( 1086 SkBitmap bg_tint = SkBitmapOperations::CreateHSLShiftedBitmap(
1086 *base_image, GetTint(ThemeService::TINT_BACKGROUND_TAB)); 1087 *base_image, GetTint(ThemeService::TINT_BACKGROUND_TAB));
1087 return new SkBitmap(SkBitmapOperations::CreateTiledBitmap( 1088 return new SkBitmap(SkBitmapOperations::CreateTiledBitmap(
1088 bg_tint, 0, 0, bg_tint.width(), bg_tint.height())); 1089 bg_tint, 0, 0, bg_tint.width(), bg_tint.height()));
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 cairo_set_line_width(cr, 1.0); 1238 cairo_set_line_width(cr, 1.0);
1238 cairo_move_to(cr, start_x, widget->allocation.y); 1239 cairo_move_to(cr, start_x, widget->allocation.y);
1239 cairo_line_to(cr, start_x, 1240 cairo_line_to(cr, start_x,
1240 widget->allocation.y + widget->allocation.height); 1241 widget->allocation.y + widget->allocation.height);
1241 cairo_stroke(cr); 1242 cairo_stroke(cr);
1242 cairo_destroy(cr); 1243 cairo_destroy(cr);
1243 cairo_pattern_destroy(pattern); 1244 cairo_pattern_destroy(pattern);
1244 1245
1245 return TRUE; 1246 return TRUE;
1246 } 1247 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698