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

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

Issue 94963003: Take GL version and extensions correctly into account when binding functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Improve Windows initialization and renderBufferMultisample explanation Created 7 years 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
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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 if (cmd->HasSwitch(switches::kCCRebaselinePixeltests)) 149 if (cmd->HasSwitch(switches::kCCRebaselinePixeltests))
150 return WritePNGFile(*result_bitmap_, test_data_dir.Append(ref_file), true); 150 return WritePNGFile(*result_bitmap_, test_data_dir.Append(ref_file), true);
151 151
152 return MatchesPNGFile(*result_bitmap_, 152 return MatchesPNGFile(*result_bitmap_,
153 test_data_dir.Append(ref_file), 153 test_data_dir.Append(ref_file),
154 comparator); 154 comparator);
155 } 155 }
156 156
157 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) { 157 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) {
158 CHECK(fake_client_); 158 CHECK(fake_client_);
159 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL)); 159 CHECK(gfx::InitializeStaticGLBindings(gfx::kGLImplementationOSMesaGL));
160 160
161 using webkit::gpu::ContextProviderInProcess; 161 using webkit::gpu::ContextProviderInProcess;
162 output_surface_.reset(new PixelTestOutputSurface( 162 output_surface_.reset(new PixelTestOutputSurface(
163 ContextProviderInProcess::CreateOffscreen())); 163 ContextProviderInProcess::CreateOffscreen()));
164 output_surface_->BindToClient(fake_client_.get()); 164 output_surface_->BindToClient(fake_client_.get());
165 165
166 resource_provider_ = 166 resource_provider_ =
167 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1); 167 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1);
168 168
169 texture_mailbox_deleter_ = make_scoped_ptr(new TextureMailboxDeleter); 169 texture_mailbox_deleter_ = make_scoped_ptr(new TextureMailboxDeleter);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 resource_provider_ = 209 resource_provider_ =
210 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1); 210 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1);
211 renderer_ = SoftwareRenderer::Create(fake_client_.get(), 211 renderer_ = SoftwareRenderer::Create(fake_client_.get(),
212 &settings_, 212 &settings_,
213 output_surface_.get(), 213 output_surface_.get(),
214 resource_provider_.get()) 214 resource_provider_.get())
215 .PassAs<DirectRenderer>(); 215 .PassAs<DirectRenderer>();
216 } 216 }
217 217
218 } // namespace cc 218 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_pixel_test.cc ('k') | content/browser/aura/software_browser_compositor_output_surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698