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

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

Issue 1160223004: Avoid false-positives of under-invalidation checking (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Check bitmaps for HTML canvas drawings only Created 5 years, 6 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
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/BoxPainter.h" 6 #include "core/paint/BoxPainter.h"
7 7
8 #include "core/HTMLNames.h" 8 #include "core/HTMLNames.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/html/HTMLFrameOwnerElement.h" 10 #include "core/html/HTMLFrameOwnerElement.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 if (recorder.canUseCachedDrawing()) 94 if (recorder.canUseCachedDrawing())
95 return; 95 return;
96 96
97 const ComputedStyle& style = m_layoutBox.styleRef(); 97 const ComputedStyle& style = m_layoutBox.styleRef();
98 BoxDecorationData boxDecorationData(m_layoutBox); 98 BoxDecorationData boxDecorationData(m_layoutBox);
99 99
100 #if ENABLE(ASSERT) 100 #if ENABLE(ASSERT)
101 // For now we don't have notification on media buffered range change from me dia player 101 // For now we don't have notification on media buffered range change from me dia player
102 // and miss paint invalidation on buffered range chagne. crbug.com/484288. 102 // and miss paint invalidation on buffered range chagne. crbug.com/484288.
103 if (style.appearance() == MediaSliderPart) 103 if (style.appearance() == MediaSliderPart)
104 recorder.setSkipUnderInvalidationChecking(); 104 recorder.setUnderInvalidationCheckingMode(DrawingDisplayItem::DontCheck) ;
chrishtr 2015/06/01 21:35:37 Wrong indentation.
Xianzhu 2015/06/01 21:43:18 It looks correct to me (4-space indent at line 103
105 #endif 105 #endif
106 106
107 // FIXME: Should eventually give the theme control over whether the box shad ow should paint, since controls could have 107 // FIXME: Should eventually give the theme control over whether the box shad ow should paint, since controls could have
108 // custom shadows of their own. 108 // custom shadows of their own.
109 if (!m_layoutBox.boxShadowShouldBeAppliedToBackground(boxDecorationData.blee dAvoidance)) 109 if (!m_layoutBox.boxShadowShouldBeAppliedToBackground(boxDecorationData.blee dAvoidance))
110 paintBoxShadow(paintInfo, paintRect, style, Normal); 110 paintBoxShadow(paintInfo, paintRect, style, Normal);
111 111
112 GraphicsContextStateSaver stateSaver(*paintInfo.context, false); 112 GraphicsContextStateSaver stateSaver(*paintInfo.context, false);
113 if (bleedAvoidanceIsClipping(boxDecorationData.bleedAvoidance)) { 113 if (bleedAvoidanceIsClipping(boxDecorationData.bleedAvoidance)) {
114 114
(...skipping 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2297 2297
2298 FloatPoint secondQuad[4]; 2298 FloatPoint secondQuad[4];
2299 secondQuad[0] = quad[0]; 2299 secondQuad[0] = quad[0];
2300 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy); 2300 secondQuad[1] = FloatPoint(quad[0].x() - r1 * cx, quad[0].y() - r1 * cy);
2301 secondQuad[2] = quad[2]; 2301 secondQuad[2] = quad[2];
2302 secondQuad[3] = quad[3]; 2302 secondQuad[3] = quad[3];
2303 graphicsContext->clipPolygon(4, secondQuad, !secondEdgeMatches); 2303 graphicsContext->clipPolygon(4, secondQuad, !secondEdgeMatches);
2304 } 2304 }
2305 2305
2306 } // namespace blink 2306 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/paint/HTMLCanvasPainter.cpp » ('j') | Source/core/paint/HTMLCanvasPainter.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698