| OLD | NEW |
| 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 <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 } | 318 } |
| 319 | 319 |
| 320 void CanvasSkia::DrawStringInt(const string16& text, | 320 void CanvasSkia::DrawStringInt(const string16& text, |
| 321 const gfx::Font& font, | 321 const gfx::Font& font, |
| 322 const SkColor& color, | 322 const SkColor& color, |
| 323 const gfx::Rect& display_rect) { | 323 const gfx::Rect& display_rect) { |
| 324 DrawStringInt(text, font, color, display_rect.x(), display_rect.y(), | 324 DrawStringInt(text, font, color, display_rect.x(), display_rect.y(), |
| 325 display_rect.width(), display_rect.height()); | 325 display_rect.width(), display_rect.height()); |
| 326 } | 326 } |
| 327 | 327 |
| 328 void CanvasSkia::TileImageInt(const SkBitmap& bitmap, | 328 void CanvasSkia::TileImage(const SkBitmap& bitmap, const gfx::Rect& rect) { |
| 329 int x, int y, int w, int h) { | 329 TileImageInt(bitmap, 0, 0, rect.x(), rect.y(), rect.width(), rect.height()); |
| 330 TileImageInt(bitmap, 0, 0, x, y, w, h); | |
| 331 } | 330 } |
| 332 | 331 |
| 333 void CanvasSkia::TileImageInt(const SkBitmap& bitmap, | 332 void CanvasSkia::TileImageInt(const SkBitmap& bitmap, |
| 334 int src_x, int src_y, | 333 int src_x, int src_y, |
| 335 int dest_x, int dest_y, int w, int h) { | 334 int dest_x, int dest_y, int w, int h) { |
| 336 if (!IntersectsClipRectInt(dest_x, dest_y, w, h)) | 335 if (!IntersectsClipRectInt(dest_x, dest_y, w, h)) |
| 337 return; | 336 return; |
| 338 | 337 |
| 339 SkPaint paint; | 338 SkPaint paint; |
| 340 | 339 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 | 426 |
| 428 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) { | 427 CanvasPaint* CanvasPaint::CreateCanvasPaint(gfx::NativeView view) { |
| 429 #if defined(OS_WIN) && !defined(USE_AURA) | 428 #if defined(OS_WIN) && !defined(USE_AURA) |
| 430 return new CanvasPaintWin(view); | 429 return new CanvasPaintWin(view); |
| 431 #else | 430 #else |
| 432 return NULL; | 431 return NULL; |
| 433 #endif | 432 #endif |
| 434 } | 433 } |
| 435 | 434 |
| 436 } // namespace gfx | 435 } // namespace gfx |
| OLD | NEW |