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

Unified Diff: third_party/WebKit/Source/platform/graphics/BoxReflection.h

Issue 2894843002: Revert of Remove cullRect() from PaintOpBuffer. (Closed)
Patch Set: rebase TestExpectations Created 3 years, 7 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/platform/graphics/BoxReflection.h
diff --git a/third_party/WebKit/Source/platform/graphics/BoxReflection.h b/third_party/WebKit/Source/platform/graphics/BoxReflection.h
index 3a18ee9712dae72a902c7a13255b47e1a5c4b3b7..7a4a5b2b44cfd593e9fad82bbbaff8c54b41e3f7 100644
--- a/third_party/WebKit/Source/platform/graphics/BoxReflection.h
+++ b/third_party/WebKit/Source/platform/graphics/BoxReflection.h
@@ -6,7 +6,6 @@
#define BoxReflection_h
#include "platform/PlatformExport.h"
-#include "platform/geometry/FloatRect.h"
#include "platform/graphics/paint/PaintRecord.h"
#include "third_party/skia/include/core/SkRefCnt.h"
@@ -14,6 +13,8 @@ class SkMatrix;
namespace blink {
+class FloatRect;
+
// A reflection, as created by -webkit-box-reflect. Consists of:
// * a direction (either vertical or horizontal)
// * an offset to be applied to the reflection after flipping about the
@@ -29,22 +30,14 @@ class PLATFORM_EXPORT BoxReflection {
kHorizontalReflection,
};
- BoxReflection(ReflectionDirection direction, float offset)
- : BoxReflection(direction, offset, nullptr, FloatRect()) {}
-
BoxReflection(ReflectionDirection direction,
float offset,
- sk_sp<PaintRecord> mask,
- const FloatRect& mask_bounds)
- : direction_(direction),
- offset_(offset),
- mask_(std::move(mask)),
- mask_bounds_(mask_bounds) {}
+ sk_sp<PaintRecord> mask = nullptr)
+ : direction_(direction), offset_(offset), mask_(std::move(mask)) {}
ReflectionDirection Direction() const { return direction_; }
float Offset() const { return offset_; }
const sk_sp<PaintRecord>& Mask() const { return mask_; }
- const FloatRect& MaskBounds() const { return mask_bounds_; }
// Returns a matrix which maps points between the original content and its
// reflection. Reflections are self-inverse, so this matrix can be used to
@@ -61,12 +54,11 @@ class PLATFORM_EXPORT BoxReflection {
ReflectionDirection direction_;
float offset_;
sk_sp<PaintRecord> mask_;
- FloatRect mask_bounds_;
};
inline bool operator==(const BoxReflection& a, const BoxReflection& b) {
return a.Direction() == b.Direction() && a.Offset() == b.Offset() &&
- a.Mask() == b.Mask() && a.MaskBounds() == b.MaskBounds();
+ a.Mask() == b.Mask();
}
inline bool operator!=(const BoxReflection& a, const BoxReflection& b) {

Powered by Google App Engine
This is Rietveld 408576698