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

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

Issue 152473008: More or less implement RenderTextHarfBuzz (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: actual android fix Created 6 years, 7 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 | « ui/gfx/render_text_ozone.cc ('k') | ui/gfx/render_text_win.cc » ('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) 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/render_text_pango.h" 5 #include "ui/gfx/render_text_pango.h"
6 6
7 #include <pango/pangocairo.h> 7 #include <pango/pangocairo.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 LayoutIndexToTextIndex(item->offset + item->length), CURSOR_BACKWARD); 514 LayoutIndexToTextIndex(item->offset + item->length), CURSOR_BACKWARD);
515 return SelectionModel(caret, CURSOR_FORWARD); 515 return SelectionModel(caret, CURSOR_FORWARD);
516 } 516 }
517 517
518 size_t RenderTextPango::GetGlyphTextIndex(PangoLayoutRun* run, 518 size_t RenderTextPango::GetGlyphTextIndex(PangoLayoutRun* run,
519 int glyph_index) const { 519 int glyph_index) const {
520 return LayoutIndexToTextIndex(run->item->offset + 520 return LayoutIndexToTextIndex(run->item->offset +
521 run->glyphs->log_clusters[glyph_index]); 521 run->glyphs->log_clusters[glyph_index]);
522 } 522 }
523 523
524 RenderText* RenderText::CreateInstance() { 524 RenderText* RenderText::CreateNativeInstance() {
525 return new RenderTextPango; 525 return new RenderTextPango;
526 } 526 }
527 527
528 } // namespace gfx 528 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/render_text_ozone.cc ('k') | ui/gfx/render_text_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698