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

Unified Diff: cc/render_pass_unittest.cc

Issue 11175009: Implement SkImageFilter support in the compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated to ToT (past the Great Renaming) Created 8 years, 2 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
« no previous file with comments | « cc/render_pass.cc ('k') | cc/render_surface_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/render_pass_unittest.cc
diff --git a/cc/render_pass_unittest.cc b/cc/render_pass_unittest.cc
index 5764e1a0ec5692b8e16ce3637d7d8ac02cfa50e9..42e6c2eea790f93f8e8d3165aed5fda22ad23c89 100644
--- a/cc/render_pass_unittest.cc
+++ b/cc/render_pass_unittest.cc
@@ -9,6 +9,7 @@
#include "CCCheckerboardDrawQuad.h"
#include "cc/test/geometry_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/skia/include/effects/SkBlurImageFilter.h"
#include <public/WebFilterOperations.h>
#include <public/WebTransformationMatrix.h>
@@ -38,6 +39,7 @@ struct RenderPassSize {
bool m_hasOcclusionFromOutsideTargetSurface;
WebKit::WebFilterOperations m_filters;
WebKit::WebFilterOperations m_backgroundFilters;
+ SkImageFilter* m_filter;
};
TEST(RenderPassTest, copyShouldBeIdenticalExceptIdAndQuads)
@@ -56,12 +58,14 @@ TEST(RenderPassTest, copyShouldBeIdenticalExceptIdAndQuads)
filters.append(WebFilterOperation::createGrayscaleFilter(0.2f));
backgroundFilters.append(WebFilterOperation::createInvertFilter(0.2f));
+ SkAutoTUnref<SkBlurImageFilter> filter(new SkBlurImageFilter(SK_Scalar1, SK_Scalar1));
pass->setDamageRect(damageRect);
pass->setHasTransparentBackground(hasTransparentBackground);
pass->setHasOcclusionFromOutsideTargetSurface(hasOcclusionFromOutsideTargetSurface);
pass->setFilters(filters);
pass->setBackgroundFilters(backgroundFilters);
+ pass->setFilter(filter);
// Stick a quad in the pass, this should not get copied.
TestRenderPass* testPass = static_cast<TestRenderPass*>(pass.get());
@@ -79,6 +83,7 @@ TEST(RenderPassTest, copyShouldBeIdenticalExceptIdAndQuads)
EXPECT_EQ(pass->hasOcclusionFromOutsideTargetSurface(), copy->hasOcclusionFromOutsideTargetSurface());
EXPECT_EQ(pass->filters(), copy->filters());
EXPECT_EQ(pass->backgroundFilters(), copy->backgroundFilters());
+ EXPECT_EQ(pass->filter(), copy->filter());
EXPECT_EQ(0u, copy->quadList().size());
EXPECT_EQ(sizeof(RenderPassSize), sizeof(RenderPass));
« no previous file with comments | « cc/render_pass.cc ('k') | cc/render_surface_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698