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

Side by Side Diff: Source/core/paint/InlinePainter.cpp

Issue 799563002: Use DrawingRecorder::canUseCachedDrawing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years 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 | « Source/core/paint/InlineFlowBoxPainter.cpp ('k') | Source/core/paint/InlineTextBoxPainter.cpp » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "config.h" 5 #include "config.h"
6 #include "core/paint/InlinePainter.h" 6 #include "core/paint/InlinePainter.h"
7 7
8 #include "core/paint/BoxPainter.h" 8 #include "core/paint/BoxPainter.h"
9 #include "core/paint/LineBoxListPainter.h" 9 #include "core/paint/LineBoxListPainter.h"
10 #include "core/paint/ObjectPainter.h" 10 #include "core/paint/ObjectPainter.h"
(...skipping 20 matching lines...) Expand all
31 if (!styleToUse->hasOutline()) 31 if (!styleToUse->hasOutline())
32 return; 32 return;
33 33
34 LayoutRect bounds; 34 LayoutRect bounds;
35 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { 35 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
36 // FIXME: Use tighter bounds. 36 // FIXME: Use tighter bounds.
37 RenderBlock* cb = m_renderInline.containingBlock(); 37 RenderBlock* cb = m_renderInline.containingBlock();
38 bounds = cb->visualOverflowRect(); 38 bounds = cb->visualOverflowRect();
39 bounds.moveBy(paintOffset); 39 bounds.moveBy(paintOffset);
40 } 40 }
41 RenderDrawingRecorder recorder(paintInfo.context, &m_renderInline, paintInfo .phase, bounds); 41 RenderDrawingRecorder recorder(paintInfo.context, m_renderInline, paintInfo. phase, bounds);
42 if (recorder.canUseCachedDrawing())
43 return;
42 44
43 if (styleToUse->outlineStyleIsAuto()) { 45 if (styleToUse->outlineStyleIsAuto()) {
44 if (RenderTheme::theme().shouldDrawDefaultFocusRing(&m_renderInline)) { 46 if (RenderTheme::theme().shouldDrawDefaultFocusRing(&m_renderInline)) {
45 // Only paint the focus ring by hand if the theme isn't able to draw the focus ring. 47 // Only paint the focus ring by hand if the theme isn't able to draw the focus ring.
46 ObjectPainter(m_renderInline).paintFocusRing(paintInfo, paintOffset, styleToUse); 48 ObjectPainter(m_renderInline).paintFocusRing(paintInfo, paintOffset, styleToUse);
47 } 49 }
48 return; 50 return;
49 } 51 }
50 52
51 if (styleToUse->outlineStyle() == BNONE) 53 if (styleToUse->outlineStyle() == BNONE)
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 pixelSnappedBox.maxX() + outlineWidth, 190 pixelSnappedBox.maxX() + outlineWidth,
189 pixelSnappedBox.maxY() + outlineWidth, 191 pixelSnappedBox.maxY() + outlineWidth,
190 BSBottom, outlineColor, outlineStyle, 192 BSBottom, outlineColor, outlineStyle,
191 outlineWidth, 193 outlineWidth,
192 outlineWidth, 194 outlineWidth,
193 antialias); 195 antialias);
194 } 196 }
195 } 197 }
196 198
197 } // namespace blink 199 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/InlineFlowBoxPainter.cpp ('k') | Source/core/paint/InlineTextBoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698