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

Side by Side Diff: cc/test/layer_tree_pixel_test.cc

Issue 14244021: cc: Remove incorrect dcheck for masks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: With pixel tests Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/layers/render_surface_impl.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/test/layer_tree_pixel_test.h" 5 #include "cc/test/layer_tree_pixel_test.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "cc/test/paths.h" 8 #include "cc/test/paths.h"
9 #include "cc/test/pixel_comparator.h" 9 #include "cc/test/pixel_comparator.h"
10 #include "cc/test/pixel_test_utils.h" 10 #include "cc/test/pixel_test_utils.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 device_viewport_rect.width(), 59 device_viewport_rect.width(),
60 device_viewport_rect.height()); 60 device_viewport_rect.height());
61 bitmap.allocPixels(); 61 bitmap.allocPixels();
62 unsigned char* pixels = static_cast<unsigned char*>(bitmap.getPixels()); 62 unsigned char* pixels = static_cast<unsigned char*>(bitmap.getPixels());
63 host_impl->Readback(pixels, device_viewport_rect); 63 host_impl->Readback(pixels, device_viewport_rect);
64 64
65 base::FilePath test_data_dir; 65 base::FilePath test_data_dir;
66 EXPECT_TRUE(PathService::Get(cc::DIR_TEST_DATA, &test_data_dir)); 66 EXPECT_TRUE(PathService::Get(cc::DIR_TEST_DATA, &test_data_dir));
67 67
68 // To rebaseline: 68 // To rebaseline:
69 // EXPECT_TRUE(WritePNGFile(bitmap, test_data_dir.Append(ref_file_))); 69 // EXPECT_TRUE(WritePNGFile(bitmap, test_data_dir.Append(ref_file_), true));
70 70
71 EXPECT_TRUE(MatchesPNGFile(bitmap, 71 EXPECT_TRUE(MatchesPNGFile(bitmap,
72 test_data_dir.Append(ref_file_), 72 test_data_dir.Append(ref_file_),
73 *pixel_comparator_)); 73 *pixel_comparator_));
74 74
75 EndTest(); 75 EndTest();
76 } 76 }
77 77
78 void LayerTreePixelTest::BeginTest() { 78 void LayerTreePixelTest::BeginTest() {
79 PostSetNeedsCommitToMainThread(); 79 PostSetNeedsCommitToMainThread();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 void LayerTreePixelTest::SetupTree() { 131 void LayerTreePixelTest::SetupTree() {
132 scoped_refptr<Layer> root = Layer::Create(); 132 scoped_refptr<Layer> root = Layer::Create();
133 root->SetBounds(content_root_->bounds()); 133 root->SetBounds(content_root_->bounds());
134 root->AddChild(content_root_); 134 root->AddChild(content_root_);
135 layer_tree_host()->SetRootLayer(root); 135 layer_tree_host()->SetRootLayer(root);
136 LayerTreeTest::SetupTree(); 136 LayerTreeTest::SetupTree();
137 } 137 }
138 138
139 } // namespace cc 139 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/render_surface_impl.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698