| 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 } else { | 447 } else { |
| 448 text_row[cur_x] |= 0xff << SK_A32_SHIFT; // Make opaque. | 448 text_row[cur_x] |= 0xff << SK_A32_SHIFT; // Make opaque. |
| 449 } | 449 } |
| 450 } | 450 } |
| 451 } | 451 } |
| 452 | 452 |
| 453 // Draw the halo bitmap with blur. | 453 // Draw the halo bitmap with blur. |
| 454 DrawBitmapInt(text_bitmap, x - 1, y - 1); | 454 DrawBitmapInt(text_bitmap, x - 1, y - 1); |
| 455 } | 455 } |
| 456 | 456 |
| 457 ui::TextureID CanvasSkia::GetTextureID() { | |
| 458 // TODO(wjmaclean) | |
| 459 return 0; | |
| 460 } | |
| 461 | |
| 462 void CanvasSkia::DrawFadeTruncatingString( | 457 void CanvasSkia::DrawFadeTruncatingString( |
| 463 const string16& text, | 458 const string16& text, |
| 464 CanvasSkia::TruncateFadeMode truncate_mode, | 459 CanvasSkia::TruncateFadeMode truncate_mode, |
| 465 size_t desired_characters_to_truncate_from_head, | 460 size_t desired_characters_to_truncate_from_head, |
| 466 const gfx::Font& font, | 461 const gfx::Font& font, |
| 467 const SkColor& color, | 462 const SkColor& color, |
| 468 const gfx::Rect& display_rect) { | 463 const gfx::Rect& display_rect) { |
| 469 int flags = NO_ELLIPSIS; | 464 int flags = NO_ELLIPSIS; |
| 470 | 465 |
| 471 // If the whole string fits in the destination then just draw it directly. | 466 // If the whole string fits in the destination then just draw it directly. |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 ClipRect(solid_part); | 570 ClipRect(solid_part); |
| 576 DrawStringInt(text, font, color, | 571 DrawStringInt(text, font, color, |
| 577 text_rect.x(), text_rect.y(), | 572 text_rect.x(), text_rect.y(), |
| 578 text_rect.width(), text_rect.height(), | 573 text_rect.width(), text_rect.height(), |
| 579 flags); | 574 flags); |
| 580 canvas_->restore(); | 575 canvas_->restore(); |
| 581 canvas_->restore(); | 576 canvas_->restore(); |
| 582 } | 577 } |
| 583 | 578 |
| 584 } // namespace gfx | 579 } // namespace gfx |
| OLD | NEW |