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

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

Issue 113637: Wire up windowless plugins. Mostly Mac related, some cross (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « app/app.gyp ('k') | app/gfx/canvas_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) 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 } 214 }
215 215
216 void Canvas::DrawStringInt(const std::wstring& text, 216 void Canvas::DrawStringInt(const std::wstring& text,
217 const gfx::Font& font, 217 const gfx::Font& font,
218 const SkColor& color, 218 const SkColor& color,
219 int x, int y, int w, int h) { 219 int x, int y, int w, int h) {
220 DrawStringInt(text, font, color, x, y, w, h, 220 DrawStringInt(text, font, color, x, y, w, h,
221 l10n_util::DefaultCanvasTextAlignment()); 221 l10n_util::DefaultCanvasTextAlignment());
222 } 222 }
223 223
224 #if defined(OS_MACOSX)
225 void Canvas::DrawStringInt(const std::wstring& text,
226 const gfx::Font& font,
227 const SkColor& color,
228 int x, int y, int w, int h,
229 int flags) {
230 NOTIMPLEMENTED();
231 }
232 #endif
233
234 void Canvas::TileImageInt(const SkBitmap& bitmap, int x, int y, int w, int h) { 224 void Canvas::TileImageInt(const SkBitmap& bitmap, int x, int y, int w, int h) {
235 TileImageInt(bitmap, 0, 0, x, y, w, h); 225 TileImageInt(bitmap, 0, 0, x, y, w, h);
236 } 226 }
237 227
238 void Canvas::TileImageInt(const SkBitmap& bitmap, int src_x, int src_y, 228 void Canvas::TileImageInt(const SkBitmap& bitmap, int src_x, int src_y,
239 int dest_x, int dest_y, int w, int h) { 229 int dest_x, int dest_y, int w, int h) {
240 if (!IntersectsClipRectInt(dest_x, dest_y, w, h)) 230 if (!IntersectsClipRectInt(dest_x, dest_y, w, h))
241 return; 231 return;
242 232
243 SkPaint paint; 233 SkPaint paint;
(...skipping 19 matching lines...) Expand all
263 253
264 // Make a bitmap to return, and a canvas to draw into it. We don't just want 254 // Make a bitmap to return, and a canvas to draw into it. We don't just want
265 // to call extractSubset or the copy constuctor, since we want an actual copy 255 // to call extractSubset or the copy constuctor, since we want an actual copy
266 // of the bitmap. 256 // of the bitmap.
267 SkBitmap result; 257 SkBitmap result;
268 device_bitmap.copyTo(&result, SkBitmap::kARGB_8888_Config); 258 device_bitmap.copyTo(&result, SkBitmap::kARGB_8888_Config);
269 return result; 259 return result;
270 } 260 }
271 261
272 } // namespace gfx 262 } // namespace gfx
OLDNEW
« no previous file with comments | « app/app.gyp ('k') | app/gfx/canvas_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698