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

Side by Side Diff: ui/gfx/canvas_skia_linux.cc

Issue 9562038: ui/gfx: Make gfx::Canvas inherit from gfx::CanvasSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more two win fixes Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/canvas_skia_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gfx/canvas_skia.h" 5 #include "ui/gfx/canvas_skia.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include <cairo/cairo.h> 9 #include <cairo/cairo.h>
10 #include <pango/pango.h> 10 #include <pango/pango.h>
11 #include <pango/pangocairo.h> 11 #include <pango/pangocairo.h>
12 12
13 #include "base/i18n/rtl.h" 13 #include "base/i18n/rtl.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "ui/gfx/font.h" 15 #include "ui/gfx/font.h"
16 #include "ui/gfx/pango_util.h" 16 #include "ui/gfx/pango_util.h"
17 #include "ui/gfx/platform_font_pango.h" 17 #include "ui/gfx/platform_font_pango.h"
18 #include "ui/gfx/rect.h" 18 #include "ui/gfx/rect.h"
19 #include "ui/gfx/skia_util.h" 19 #include "ui/gfx/skia_util.h"
20 #include "ui/gfx/canvas.h"
20 21
21 using std::max; 22 using std::max;
22 23
23 namespace { 24 namespace {
24 25
25 // Multiply by the text height to determine how much text should be faded 26 // Multiply by the text height to determine how much text should be faded
26 // when elliding. 27 // when elliding.
27 const double kFadeWidthFactor = 1.5; 28 const double kFadeWidthFactor = 1.5;
28 29
29 // End state of the elliding fade. 30 // End state of the elliding fade.
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 int flags) { 254 int flags) {
254 if (!IntersectsClipRectInt(x, y, w, h)) 255 if (!IntersectsClipRectInt(x, y, w, h))
255 return; 256 return;
256 257
257 gfx::Rect bounds(x, y, w, h); 258 gfx::Rect bounds(x, y, w, h);
258 DrawStringContext context(this, text, font, bounds, bounds, flags); 259 DrawStringContext context(this, text, font, bounds, bounds, flags);
259 context.Draw(color); 260 context.Draw(color);
260 } 261 }
261 262
262 } // namespace gfx 263 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/canvas_skia_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698