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

Side by Side Diff: Source/core/paint/LayoutObjectDrawingRecorder.h

Issue 1313633003: Drawing bounds should not be pixel-snapped. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: one rect only Created 5 years, 3 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 | « no previous file | Source/core/paint/LayoutObjectDrawingRecorderTest.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 #ifndef LayoutObjectDrawingRecorder_h 5 #ifndef LayoutObjectDrawingRecorder_h
6 #define LayoutObjectDrawingRecorder_h 6 #define LayoutObjectDrawingRecorder_h
7 7
8 #include "core/layout/LayoutObject.h" 8 #include "core/layout/LayoutObject.h"
9 #include "core/paint/PaintPhase.h" 9 #include "core/paint/PaintPhase.h"
10 #include "platform/geometry/LayoutRect.h" 10 #include "platform/geometry/LayoutRect.h"
(...skipping 24 matching lines...) Expand all
35 { 35 {
36 // We may paint a delayed-invalidation object before it's actually inval idated. 36 // We may paint a delayed-invalidation object before it's actually inval idated.
37 if (layoutObject.fullPaintInvalidationReason() == PaintInvalidationDelay edFull) 37 if (layoutObject.fullPaintInvalidationReason() == PaintInvalidationDelay edFull)
38 m_cacheSkipper.emplace(context); 38 m_cacheSkipper.emplace(context);
39 m_drawingRecorder.emplace(context, layoutObject, displayItemType, clip); 39 m_drawingRecorder.emplace(context, layoutObject, displayItemType, clip);
40 } 40 }
41 41
42 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la youtObject, PaintPhase phase, const FloatRect& clip) 42 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la youtObject, PaintPhase phase, const FloatRect& clip)
43 : LayoutObjectDrawingRecorder(context, layoutObject, DisplayItem::paintP haseToDrawingType(phase), clip) { } 43 : LayoutObjectDrawingRecorder(context, layoutObject, DisplayItem::paintP haseToDrawingType(phase), clip) { }
44 44
45 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la youtObject, DisplayItem::Type type, const LayoutRect& clip)
46 : LayoutObjectDrawingRecorder(context, layoutObject, type, pixelSnappedI ntRect(clip)) { }
47
48 #if ENABLE(ASSERT) 45 #if ENABLE(ASSERT)
49 void setUnderInvalidationCheckingMode(DrawingDisplayItem::UnderInvalidationC heckingMode mode) { m_drawingRecorder->setUnderInvalidationCheckingMode(mode); } 46 void setUnderInvalidationCheckingMode(DrawingDisplayItem::UnderInvalidationC heckingMode mode) { m_drawingRecorder->setUnderInvalidationCheckingMode(mode); }
50 #endif 47 #endif
51 48
52 private: 49 private:
53 Optional<DisplayItemCacheSkipper> m_cacheSkipper; 50 Optional<DisplayItemCacheSkipper> m_cacheSkipper;
54 Optional<DrawingRecorder> m_drawingRecorder; 51 Optional<DrawingRecorder> m_drawingRecorder;
55 }; 52 };
56 53
57 } // namespace blink 54 } // namespace blink
58 55
59 #endif // LayoutObjectDrawingRecorder_h 56 #endif // LayoutObjectDrawingRecorder_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/paint/LayoutObjectDrawingRecorderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698