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

Unified Diff: third_party/WebKit/Source/core/paint/ClipPathClipper.h

Issue 2738493002: Remove begin/end methods on CompositingRecorder. (Closed)
Patch Set: rm-compositingrecorder-methods: replace-default Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/ClipPathClipper.h
diff --git a/third_party/WebKit/Source/core/paint/ClipPathClipper.h b/third_party/WebKit/Source/core/paint/ClipPathClipper.h
index d726046b7601ad851068c506a6a9ccf844caf8e5..155dc1257c5124a1ebd3a9259bfb05cb87e19715 100644
--- a/third_party/WebKit/Source/core/paint/ClipPathClipper.h
+++ b/third_party/WebKit/Source/core/paint/ClipPathClipper.h
@@ -6,6 +6,7 @@
#define ClipPathClipper_h
#include "platform/graphics/paint/ClipPathRecorder.h"
+#include "platform/graphics/paint/CompositingRecorder.h"
#include "wtf/Optional.h"
namespace blink {
@@ -33,11 +34,26 @@ class ClipPathClipper {
bool usingMask() const { return m_clipperState == ClipperState::AppliedMask; }
private:
+ // Returns false if there is a problem drawing the mask.
+ bool prepareEffect(const FloatRect& targetBoundingBox,
+ const FloatRect& visualRect,
+ const FloatPoint& layerPositionOffset);
+ bool drawClipAsMask(const FloatRect& targetBoundingBox,
+ const FloatRect& targetVisualRect,
+ const AffineTransform&,
+ const FloatPoint&);
+ void finishEffect();
+
LayoutSVGResourceClipper* m_resourceClipper;
- Optional<ClipPathRecorder> m_clipPathRecorder;
ClipperState m_clipperState;
const LayoutObject& m_layoutObject;
GraphicsContext& m_context;
+
+ // TODO(pdr): This pattern should be cleaned up so that the recorders are just
+ // on the stack.
+ Optional<ClipPathRecorder> m_clipPathRecorder;
+ Optional<CompositingRecorder> m_maskClipRecorder;
+ Optional<CompositingRecorder> m_maskContentRecorder;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698