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

Unified Diff: cc/test/pixel_test.cc

Issue 15004009: cc: Fix readback from non-root layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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_test.h ('k') | cc/trees/layer_tree_host_pixeltest_readback.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/pixel_test.cc
diff --git a/cc/test/pixel_test.cc b/cc/test/pixel_test.cc
index 5d28d59a1456d0257a7ea5afcce5a909fc2f5d78..7d4c8f8e42ef2b2b2b6e7d0ea404b662bde1d9cb 100644
--- a/cc/test/pixel_test.cc
+++ b/cc/test/pixel_test.cc
@@ -61,9 +61,20 @@ PixelTest::~PixelTest() {}
bool PixelTest::RunPixelTest(RenderPassList* pass_list,
const base::FilePath& ref_file,
const PixelComparator& comparator) {
+ return RunPixelTestWithReadbackTarget(pass_list,
+ pass_list->back(),
+ ref_file,
+ comparator);
+}
+
+bool PixelTest::RunPixelTestWithReadbackTarget(
+ RenderPassList* pass_list,
+ RenderPass* target,
+ const base::FilePath& ref_file,
+ const PixelComparator& comparator) {
base::RunLoop run_loop;
- pass_list->back()->copy_callbacks.push_back(
+ target->copy_callbacks.push_back(
base::Bind(&PixelTest::ReadbackResult,
base::Unretained(this),
run_loop.QuitClosure()));
« no previous file with comments | « cc/test/pixel_test.h ('k') | cc/trees/layer_tree_host_pixeltest_readback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698