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

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

Issue 171363008: cc: Make cc_unittests opt into real GL NullDraw contexts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nulldraw-cc: reviewed Created 6 years, 10 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/test/pixel_test.h ('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/path_service.h" 8 #include "base/path_service.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "cc/base/switches.h" 10 #include "cc/base/switches.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 CommandLine* cmd = CommandLine::ForCurrentProcess(); 111 CommandLine* cmd = CommandLine::ForCurrentProcess();
112 if (cmd->HasSwitch(switches::kCCRebaselinePixeltests)) 112 if (cmd->HasSwitch(switches::kCCRebaselinePixeltests))
113 return WritePNGFile(*result_bitmap_, test_data_dir.Append(ref_file), true); 113 return WritePNGFile(*result_bitmap_, test_data_dir.Append(ref_file), true);
114 114
115 return MatchesPNGFile( 115 return MatchesPNGFile(
116 *result_bitmap_, test_data_dir.Append(ref_file), comparator); 116 *result_bitmap_, test_data_dir.Append(ref_file), comparator);
117 } 117 }
118 118
119 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) { 119 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) {
120 enable_pixel_output_.reset(new gfx::DisableNullDrawGLBindings);
121
120 output_surface_.reset( 122 output_surface_.reset(
121 new PixelTestOutputSurface(new TestInProcessContextProvider)); 123 new PixelTestOutputSurface(new TestInProcessContextProvider));
122 output_surface_->BindToClient(output_surface_client_.get()); 124 output_surface_->BindToClient(output_surface_client_.get());
123 125
124 resource_provider_ = 126 resource_provider_ =
125 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1); 127 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1);
126 128
127 texture_mailbox_deleter_ = make_scoped_ptr(new TextureMailboxDeleter); 129 texture_mailbox_deleter_ = make_scoped_ptr(new TextureMailboxDeleter);
128 130
129 renderer_ = GLRenderer::Create(this, 131 renderer_ = GLRenderer::Create(this,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 output_surface_.reset(new PixelTestOutputSurface(device.Pass())); 164 output_surface_.reset(new PixelTestOutputSurface(device.Pass()));
163 output_surface_->BindToClient(output_surface_client_.get()); 165 output_surface_->BindToClient(output_surface_client_.get());
164 resource_provider_ = 166 resource_provider_ =
165 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1); 167 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1);
166 renderer_ = SoftwareRenderer::Create( 168 renderer_ = SoftwareRenderer::Create(
167 this, &settings_, output_surface_.get(), resource_provider_.get()) 169 this, &settings_, output_surface_.get(), resource_provider_.get())
168 .PassAs<DirectRenderer>(); 170 .PassAs<DirectRenderer>();
169 } 171 }
170 172
171 } // namespace cc 173 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/pixel_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698