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

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

Issue 1316163002: Make the LayoutRect->FloatRect constructor explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
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 20 matching lines...) Expand all
31 return useCachedDrawingIfPossible(context, layoutObject, DisplayItem::pa intPhaseToDrawingType(phase)); 31 return useCachedDrawingIfPossible(context, layoutObject, DisplayItem::pa intPhaseToDrawingType(phase));
32 } 32 }
33 33
34 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la youtObject, DisplayItem::Type displayItemType, const FloatRect& clip) 34 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la youtObject, DisplayItem::Type displayItemType, const FloatRect& clip)
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 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la youtObject, DisplayItem::Type displayItemType, const LayoutRect& clip)
42 : LayoutObjectDrawingRecorder(context, layoutObject, displayItemType, Fl oatRect(clip)) { }
41 43
42 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la youtObject, PaintPhase phase, const FloatRect& clip) 44 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la youtObject, PaintPhase phase, const FloatRect& clip)
43 : LayoutObjectDrawingRecorder(context, layoutObject, DisplayItem::paintP haseToDrawingType(phase), clip) { } 45 : LayoutObjectDrawingRecorder(context, layoutObject, DisplayItem::paintP haseToDrawingType(phase), clip) { }
44 46
47 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la youtObject, PaintPhase phase, const LayoutRect& clip)
48 : LayoutObjectDrawingRecorder(context, layoutObject, DisplayItem::paintP haseToDrawingType(phase), FloatRect(clip)) { }
49
50 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la youtObject, PaintPhase phase, const IntRect& clip)
51 : LayoutObjectDrawingRecorder(context, layoutObject, DisplayItem::paintP haseToDrawingType(phase), FloatRect(clip)) { }
52
45 #if ENABLE(ASSERT) 53 #if ENABLE(ASSERT)
46 void setUnderInvalidationCheckingMode(DrawingDisplayItem::UnderInvalidationC heckingMode mode) { m_drawingRecorder->setUnderInvalidationCheckingMode(mode); } 54 void setUnderInvalidationCheckingMode(DrawingDisplayItem::UnderInvalidationC heckingMode mode) { m_drawingRecorder->setUnderInvalidationCheckingMode(mode); }
47 #endif 55 #endif
48 56
49 private: 57 private:
50 Optional<DisplayItemCacheSkipper> m_cacheSkipper; 58 Optional<DisplayItemCacheSkipper> m_cacheSkipper;
51 Optional<DrawingRecorder> m_drawingRecorder; 59 Optional<DrawingRecorder> m_drawingRecorder;
52 }; 60 };
53 61
54 } // namespace blink 62 } // namespace blink
55 63
56 #endif // LayoutObjectDrawingRecorder_h 64 #endif // LayoutObjectDrawingRecorder_h
OLDNEW
« no previous file with comments | « Source/core/paint/LayerClipRecorderTest.cpp ('k') | Source/core/paint/LayoutObjectDrawingRecorderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698