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

Unified Diff: cc/trees/layer_tree_host_pixeltest_blending.cc

Issue 532003003: Adding support for blending in cc::SoftwareRenderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years, 3 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/test/pixel_comparator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_pixeltest_blending.cc
diff --git a/cc/trees/layer_tree_host_pixeltest_blending.cc b/cc/trees/layer_tree_host_pixeltest_blending.cc
index 7a492a1d5bfde2cc2e11afa89d82057645b60256..f01d426c614d58e2ac8d0b7808e0a0778bd02f9f 100644
--- a/cc/trees/layer_tree_host_pixeltest_blending.cc
+++ b/cc/trees/layer_tree_host_pixeltest_blending.cc
@@ -5,6 +5,7 @@
#include "cc/layers/solid_color_layer.h"
#include "cc/layers/texture_layer.h"
#include "cc/test/layer_tree_pixel_test.h"
+#include "cc/test/pixel_comparator.h"
#if !defined(OS_ANDROID)
@@ -24,6 +25,11 @@ SkXfermode::Mode const kBlendModes[] = {
const int kBlendModesCount = arraysize(kBlendModes);
class LayerTreeHostBlendingPixelTest : public LayerTreePixelTest {
+ public:
+ LayerTreeHostBlendingPixelTest() {
+ pixel_comparator_.reset(new FuzzyPixelOffByOneComparator(true));
+ }
+
protected:
void RunBlendingWithRootPixelTestType(PixelTestType type) {
const int kLaneWidth = 15;
@@ -82,6 +88,10 @@ TEST_F(LayerTreeHostBlendingPixelTest, BlendingWithRoot_GL) {
RunBlendingWithRootPixelTestType(GL_WITH_BITMAP);
}
+TEST_F(LayerTreeHostBlendingPixelTest, BlendingWithRoot_Software) {
+ RunBlendingWithRootPixelTestType(SOFTWARE_WITH_BITMAP);
+}
+
TEST_F(LayerTreeHostBlendingPixelTest, BlendingWithBackgroundFilter) {
const int kLaneWidth = 15;
const int kLaneHeight = kBlendModesCount * kLaneWidth;
@@ -114,6 +124,10 @@ TEST_F(LayerTreeHostBlendingPixelTest, BlendingWithTransparent_GL) {
RunBlendingWithTransparentPixelTestType(GL_WITH_BITMAP);
}
+TEST_F(LayerTreeHostBlendingPixelTest, BlendingWithTransparent_Software) {
+ RunBlendingWithTransparentPixelTestType(SOFTWARE_WITH_BITMAP);
+}
+
} // namespace
} // namespace cc
« no previous file with comments | « cc/test/pixel_comparator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698