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

Side by Side Diff: ui/gfx/render_text_win.cc

Issue 8476019: ui/gfx: Convert Canvas::DrawRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland - WHAT HERE could have broken media_unittests???? Created 9 years, 1 month 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 | « ui/gfx/render_text_linux.cc ('k') | ui/gfx/skia_util.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) 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/render_text_win.h" 5 #include "ui/gfx/render_text_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 canvas_skia->drawPosText(run->glyphs.get(), byte_length, &pos[0], paint); 723 canvas_skia->drawPosText(run->glyphs.get(), byte_length, &pos[0], paint);
724 724
725 if (run->strike || run->underline) 725 if (run->strike || run->underline)
726 DrawTextRunDecorations(canvas_skia, paint, *run, run_x, y); 726 DrawTextRunDecorations(canvas_skia, paint, *run, run_x, y);
727 } 727 }
728 } 728 }
729 729
730 void RenderTextWin::DrawCursor(Canvas* canvas) { 730 void RenderTextWin::DrawCursor(Canvas* canvas) {
731 // Paint cursor. Replace cursor is drawn as rectangle for now. 731 // Paint cursor. Replace cursor is drawn as rectangle for now.
732 // TODO(msw): Draw a better cursor with a better indication of association. 732 // TODO(msw): Draw a better cursor with a better indication of association.
733 if (cursor_visible() && focused()) { 733 if (cursor_visible() && focused())
734 Rect r(GetUpdatedCursorBounds()); 734 canvas->DrawRect(GetUpdatedCursorBounds(), kCursorColor);
735 canvas->DrawRectInt(kCursorColor, r.x(), r.y(), r.width(), r.height());
736 }
737 } 735 }
738 736
739 RenderText* RenderText::CreateRenderText() { 737 RenderText* RenderText::CreateRenderText() {
740 return new RenderTextWin; 738 return new RenderTextWin;
741 } 739 }
742 740
743 } // namespace gfx 741 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/render_text_linux.cc ('k') | ui/gfx/skia_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698