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

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

Issue 732983005: Prefix CommandLine usege with base namespace (Part 5: cc/) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | no next file » | 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/pixel_test.h" 5 #include "cc/test/pixel_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 bool PixelTest::PixelsMatchReference(const base::FilePath& ref_file, 107 bool PixelTest::PixelsMatchReference(const base::FilePath& ref_file,
108 const PixelComparator& comparator) { 108 const PixelComparator& comparator) {
109 base::FilePath test_data_dir; 109 base::FilePath test_data_dir;
110 if (!PathService::Get(CCPaths::DIR_TEST_DATA, &test_data_dir)) 110 if (!PathService::Get(CCPaths::DIR_TEST_DATA, &test_data_dir))
111 return false; 111 return false;
112 112
113 // If this is false, we didn't set up a readback on a render pass. 113 // If this is false, we didn't set up a readback on a render pass.
114 if (!result_bitmap_) 114 if (!result_bitmap_)
115 return false; 115 return false;
116 116
117 CommandLine* cmd = CommandLine::ForCurrentProcess(); 117 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
118 if (cmd->HasSwitch(switches::kCCRebaselinePixeltests)) 118 if (cmd->HasSwitch(switches::kCCRebaselinePixeltests))
119 return WritePNGFile(*result_bitmap_, test_data_dir.Append(ref_file), true); 119 return WritePNGFile(*result_bitmap_, test_data_dir.Append(ref_file), true);
120 120
121 return MatchesPNGFile( 121 return MatchesPNGFile(
122 *result_bitmap_, test_data_dir.Append(ref_file), comparator); 122 *result_bitmap_, test_data_dir.Append(ref_file), comparator);
123 } 123 }
124 124
125 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend, 125 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend,
126 bool flipped_output_surface) { 126 bool flipped_output_surface) {
127 enable_pixel_output_.reset(new gfx::DisableNullDrawGLBindings); 127 enable_pixel_output_.reset(new gfx::DisableNullDrawGLBindings);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 gpu_memory_buffer_manager_.get(), 186 gpu_memory_buffer_manager_.get(),
187 main_thread_task_runner_.get(), 187 main_thread_task_runner_.get(),
188 0, 188 0,
189 false, 189 false,
190 1); 190 1);
191 renderer_ = SoftwareRenderer::Create( 191 renderer_ = SoftwareRenderer::Create(
192 this, &settings_, output_surface_.get(), resource_provider_.get()); 192 this, &settings_, output_surface_.get(), resource_provider_.get());
193 } 193 }
194 194
195 } // namespace cc 195 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698