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

Side by Side Diff: app/gfx/canvas_win.cc

Issue 125109: Refactor the PlatformContext layer to have only one class. (Closed)
Patch Set: Created 11 years, 6 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
« no previous file with comments | « app/gfx/canvas_paint.h ('k') | base/gfx/native_theme.h » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "app/gfx/canvas.h" 5 #include "app/gfx/canvas.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "app/gfx/font.h" 9 #include "app/gfx/font.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 } 114 }
115 return f; 115 return f;
116 } 116 }
117 117
118 } // anonymous namespace 118 } // anonymous namespace
119 119
120 namespace gfx { 120 namespace gfx {
121 121
122 Canvas::Canvas(int width, int height, bool is_opaque) 122 Canvas::Canvas(int width, int height, bool is_opaque)
123 : skia::PlatformCanvasWin(width, height, is_opaque) { 123 : skia::PlatformCanvas(width, height, is_opaque) {
124 } 124 }
125 125
126 Canvas::Canvas() : skia::PlatformCanvasWin() { 126 Canvas::Canvas() : skia::PlatformCanvas() {
127 } 127 }
128 128
129 Canvas::~Canvas() { 129 Canvas::~Canvas() {
130 } 130 }
131 131
132 // static 132 // static
133 void Canvas::SizeStringInt(const std::wstring& text, 133 void Canvas::SizeStringInt(const std::wstring& text,
134 const gfx::Font& font, 134 const gfx::Font& font,
135 int *width, int *height, int flags) { 135 int *width, int *height, int flags) {
136 HDC dc = GetDC(NULL); 136 HDC dc = GetDC(NULL);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 text_row[cur_x] |= 0xff << SK_A32_SHIFT; // Make opaque. 259 text_row[cur_x] |= 0xff << SK_A32_SHIFT; // Make opaque.
260 } 260 }
261 } 261 }
262 } 262 }
263 263
264 // Draw the halo bitmap with blur. 264 // Draw the halo bitmap with blur.
265 drawBitmap(text_bitmap, SkIntToScalar(x - 1), SkIntToScalar(y - 1)); 265 drawBitmap(text_bitmap, SkIntToScalar(x - 1), SkIntToScalar(y - 1));
266 } 266 }
267 267
268 } // namespace gfx 268 } // namespace gfx
OLDNEW
« no previous file with comments | « app/gfx/canvas_paint.h ('k') | base/gfx/native_theme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698