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

Unified Diff: cc/trees/layer_tree_host_pixeltest_filters.cc

Issue 1960543002: Optimize render passes with single quads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix context menus Created 4 years, 6 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: cc/trees/layer_tree_host_pixeltest_filters.cc
diff --git a/cc/trees/layer_tree_host_pixeltest_filters.cc b/cc/trees/layer_tree_host_pixeltest_filters.cc
index 9455da3acf340e7329cbe6bfc46b271dfbdf964b..5e974fe3530ac6921f966966a8d95270da2a936c 100644
--- a/cc/trees/layer_tree_host_pixeltest_filters.cc
+++ b/cc/trees/layer_tree_host_pixeltest_filters.cc
@@ -5,9 +5,11 @@
#include <stddef.h>
#include "build/build_config.h"
+#include "cc/layers/picture_layer.h"
#include "cc/layers/solid_color_layer.h"
#include "cc/test/layer_tree_pixel_test.h"
#include "cc/test/pixel_comparator.h"
+#include "cc/test/solid_color_content_layer_client.h"
#include "third_party/skia/include/effects/SkColorFilterImageFilter.h"
#include "third_party/skia/include/effects/SkColorMatrixFilter.h"
#include "third_party/skia/include/effects/SkOffsetImageFilter.h"
@@ -585,8 +587,14 @@ class RotatedDropShadowFilterTest : public LayerTreeHostFiltersPixelTest {
gfx::Rect rect(50, 50, 100, 100);
- scoped_refptr<SolidColorLayer> child =
- CreateSolidColorLayer(rect, SK_ColorBLUE);
+ // Use a border to defeat solid color detection to force a tile quad.
+ // This is intended to test render pass removal optimizations.
+ SolidColorContentLayerClient blue_client(SK_ColorBLUE, rect.size(), 1,
+ SK_ColorBLACK);
+ scoped_refptr<PictureLayer> child = PictureLayer::Create(&blue_client);
+ child->SetBounds(rect.size());
+ child->SetPosition(gfx::PointF(rect.origin()));
+ child->SetIsDrawable(true);
gfx::Transform transform;
transform.Translate(50.0f, 50.0f);

Powered by Google App Engine
This is Rietveld 408576698