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

Side by Side Diff: sky/engine/core/rendering/InlineTextBox.cpp

Issue 899753003: Walk render tree instead of render layers for paint. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
1 /* 1 /*
2 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 471
472 if (!emphasisMark.isEmpty()) { 472 if (!emphasisMark.isEmpty()) {
473 if (textStyle.emphasisMarkColor != textStyle.fillColor) 473 if (textStyle.emphasisMarkColor != textStyle.fillColor)
474 context->setFillColor(textStyle.emphasisMarkColor); 474 context->setFillColor(textStyle.emphasisMarkColor);
475 paintEmphasisMark(context, emphasisMark, emphasisMarkOffset, startOffset , endOffset, length, font, textRun, textOrigin, boxRect); 475 paintEmphasisMark(context, emphasisMark, emphasisMarkOffset, startOffset , endOffset, length, font, textRun, textOrigin, boxRect);
476 } 476 }
477 } 477 }
478 478
479 } // namespace 479 } // namespace
480 480
481 void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /*lineTop*/, LayoutUnit /*lineBottom*/) 481 void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /*lineTop*/, LayoutUnit /*lineBottom*/, Vector<RenderBox*> layers)
esprehn 2015/02/05 23:47:00 Vector<RenderBox*>&, you're making copies all over
482 { 482 {
483 if (isLineBreak() || m_truncation == cFullTruncation || !m_len) 483 if (isLineBreak() || m_truncation == cFullTruncation || !m_len)
484 return; 484 return;
485 485
486 LayoutRect logicalVisualOverflow = logicalOverflowRect(); 486 LayoutRect logicalVisualOverflow = logicalOverflowRect();
487 LayoutUnit logicalStart = logicalVisualOverflow.x() + paintOffset.x(); 487 LayoutUnit logicalStart = logicalVisualOverflow.x() + paintOffset.x();
488 LayoutUnit logicalExtent = logicalVisualOverflow.width(); 488 LayoutUnit logicalExtent = logicalVisualOverflow.width();
489 489
490 LayoutUnit paintEnd = paintInfo.rect.maxX(); 490 LayoutUnit paintEnd = paintInfo.rect.maxX();
491 LayoutUnit paintStart = paintInfo.rect.x(); 491 LayoutUnit paintStart = paintInfo.rect.x();
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); 1335 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj);
1336 const int rendererCharacterOffset = 24; 1336 const int rendererCharacterOffset = 24;
1337 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) 1337 for (; printedCharacters < rendererCharacterOffset; printedCharacters++)
1338 fputc(' ', stderr); 1338 fputc(' ', stderr);
1339 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 1339 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
1340 } 1340 }
1341 1341
1342 #endif 1342 #endif
1343 1343
1344 } // namespace blink 1344 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698