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

Unified Diff: third_party/WebKit/Source/platform/testing/PictureMatchers.h

Issue 2581843002: Implement merging non-composited paint property nodes in the PACompositor. (Closed)
Patch Set: none Created 4 years 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/testing/PictureMatchers.h
diff --git a/third_party/WebKit/Source/platform/testing/PictureMatchers.h b/third_party/WebKit/Source/platform/testing/PictureMatchers.h
index 01368f213e4fbadfb4a62eea47368736feeb1219..3f400a9eedd0c8a8468838a348df01f62358f5f8 100644
--- a/third_party/WebKit/Source/platform/testing/PictureMatchers.h
+++ b/third_party/WebKit/Source/platform/testing/PictureMatchers.h
@@ -5,6 +5,7 @@
#ifndef PictureMatchers_h
#define PictureMatchers_h
+#include "platform/geometry/FloatRect.h"
#include "platform/graphics/Color.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -15,10 +16,25 @@ namespace blink {
class FloatRect;
// Matches if the picture draws exactly one rectangle, which (after accounting
-// for the total transformation matrix) matches the rect provided, and whose
-// paint has the color requested.
+// for the total transformation matrix and applying any clips inside that
+// transform) matches the rect provided, and whose paint has the color
+// requested.
+// Note that clips which appear outside of a transform are not currently
+// supported.
::testing::Matcher<const SkPicture&> drawsRectangle(const FloatRect&, Color);
+struct RectWithColor {
+ RectWithColor(const FloatRect& rectArg, const Color& colorArg)
+ : rect(rectArg), color(colorArg) {}
+ FloatRect rect;
+ Color color;
+};
+
+// Same as above, but matches a number of rectangles equal to the size of the
+// given vector.
+::testing::Matcher<const SkPicture&> drawsRectangles(
+ const Vector<RectWithColor>&);
+
} // namespace blink
#endif // PictureMatchers_h

Powered by Google App Engine
This is Rietveld 408576698