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

Unified Diff: cc/test/pixel_test.h

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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/test/layer_tree_test.cc ('k') | cc/test/pixel_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/pixel_test.h
diff --git a/cc/test/pixel_test.h b/cc/test/pixel_test.h
index 1a6c5baab851ddf727992507b1590b8e86252f36..dff279008123a12067bb3ab6eee316269f69d6b1 100644
--- a/cc/test/pixel_test.h
+++ b/cc/test/pixel_test.h
@@ -39,6 +39,12 @@ class PixelTest : public testing::Test, RendererClient {
const base::FilePath& ref_file,
const PixelComparator& comparator);
+ bool RunPixelTestWithReadbackTargetAndArea(RenderPassList* pass_list,
+ RenderPass* target,
+ const base::FilePath& ref_file,
+ const PixelComparator& comparator,
+ const gfx::Rect* copy_rect);
+
LayerTreeSettings settings_;
gfx::Size device_viewport_size_;
bool disable_picture_quad_image_filtering_;
@@ -55,7 +61,7 @@ class PixelTest : public testing::Test, RendererClient {
gfx::Vector2d external_device_viewport_offset_;
gfx::Rect external_device_clip_rect_;
- void SetUpGLRenderer(bool use_skia_gpu_backend);
+ void SetUpGLRenderer(bool use_skia_gpu_backend, bool flipped_output_surface);
void SetUpSoftwareRenderer();
void ForceExpandedViewport(const gfx::Size& surface_expansion);
@@ -117,9 +123,25 @@ class SoftwareRendererWithExpandedViewport : public SoftwareRenderer {
: SoftwareRenderer(client, settings, output_surface, resource_provider) {}
};
+class GLRendererWithFlippedSurface : public GLRenderer {
+ public:
+ GLRendererWithFlippedSurface(RendererClient* client,
+ const LayerTreeSettings* settings,
+ OutputSurface* output_surface,
+ ResourceProvider* resource_provider,
+ TextureMailboxDeleter* texture_mailbox_deleter,
+ int highp_threshold_min)
+ : GLRenderer(client,
+ settings,
+ output_surface,
+ resource_provider,
+ texture_mailbox_deleter,
+ highp_threshold_min) {}
+};
+
template<>
inline void RendererPixelTest<GLRenderer>::SetUp() {
- SetUpGLRenderer(false);
+ SetUpGLRenderer(false, false);
}
template<>
@@ -134,7 +156,7 @@ inline bool RendererPixelTest<GLRenderer>::ExpandedViewport() const {
template<>
inline void RendererPixelTest<GLRendererWithExpandedViewport>::SetUp() {
- SetUpGLRenderer(false);
+ SetUpGLRenderer(false, false);
ForceExpandedViewport(gfx::Size(50, 50));
ForceViewportOffset(gfx::Vector2d(10, 20));
}
@@ -151,7 +173,24 @@ RendererPixelTest<GLRendererWithExpandedViewport>::ExpandedViewport() const {
return true;
}
-template<>
+template <>
+inline void RendererPixelTest<GLRendererWithFlippedSurface>::SetUp() {
+ SetUpGLRenderer(false, true);
+}
+
+template <>
+inline bool RendererPixelTest<GLRendererWithFlippedSurface>::UseSkiaGPUBackend()
+ const {
+ return false;
+}
+
+template <>
+inline bool RendererPixelTest<GLRendererWithFlippedSurface>::ExpandedViewport()
+ const {
+ return true;
+}
+
+template <>
inline void RendererPixelTest<SoftwareRenderer>::SetUp() {
SetUpSoftwareRenderer();
}
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/test/pixel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698