| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 font.GetNativeFont(), text_rect, head_part, is_rtl, | 562 font.GetNativeFont(), text_rect, head_part, is_rtl, |
| 563 flags); | 563 flags); |
| 564 if (is_truncating_tail) | 564 if (is_truncating_tail) |
| 565 DrawTextGradientPart(hdc, gradient_canvas.get(), text, color, | 565 DrawTextGradientPart(hdc, gradient_canvas.get(), text, color, |
| 566 font.GetNativeFont(), text_rect, tail_part, !is_rtl, | 566 font.GetNativeFont(), text_rect, tail_part, !is_rtl, |
| 567 flags); | 567 flags); |
| 568 } | 568 } |
| 569 | 569 |
| 570 // Draw the solid part. | 570 // Draw the solid part. |
| 571 canvas_->save(SkCanvas::kClip_SaveFlag); | 571 canvas_->save(SkCanvas::kClip_SaveFlag); |
| 572 ClipRectInt(solid_part.x(), solid_part.y(), | 572 ClipRectInt(solid_part); |
| 573 solid_part.width(), solid_part.height()); | |
| 574 DrawStringInt(text, font, color, | 573 DrawStringInt(text, font, color, |
| 575 text_rect.x(), text_rect.y(), | 574 text_rect.x(), text_rect.y(), |
| 576 text_rect.width(), text_rect.height(), | 575 text_rect.width(), text_rect.height(), |
| 577 flags); | 576 flags); |
| 578 canvas_->restore(); | 577 canvas_->restore(); |
| 579 canvas_->restore(); | 578 canvas_->restore(); |
| 580 } | 579 } |
| 581 | 580 |
| 582 } // namespace gfx | 581 } // namespace gfx |
| OLD | NEW |