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

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

Issue 98643013: Take GL version and extensions correctly into account when binding functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Clarify code in generate_bindings.py according to feedback Created 6 years, 11 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
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 CommandLine* cmd = CommandLine::ForCurrentProcess(); 112 CommandLine* cmd = CommandLine::ForCurrentProcess();
113 if (cmd->HasSwitch(switches::kCCRebaselinePixeltests)) 113 if (cmd->HasSwitch(switches::kCCRebaselinePixeltests))
114 return WritePNGFile(*result_bitmap_, test_data_dir.Append(ref_file), true); 114 return WritePNGFile(*result_bitmap_, test_data_dir.Append(ref_file), true);
115 115
116 return MatchesPNGFile( 116 return MatchesPNGFile(
117 *result_bitmap_, test_data_dir.Append(ref_file), comparator); 117 *result_bitmap_, test_data_dir.Append(ref_file), comparator);
118 } 118 }
119 119
120 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) { 120 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) {
121 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL)); 121 CHECK(gfx::InitializeStaticGLBindings(gfx::kGLImplementationOSMesaGL));
122 122
123 output_surface_.reset( 123 output_surface_.reset(
124 new PixelTestOutputSurface(new TestInProcessContextProvider)); 124 new PixelTestOutputSurface(new TestInProcessContextProvider));
125 output_surface_->BindToClient(output_surface_client_.get()); 125 output_surface_->BindToClient(output_surface_client_.get());
126 126
127 resource_provider_ = 127 resource_provider_ =
128 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1); 128 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1);
129 129
130 texture_mailbox_deleter_ = make_scoped_ptr(new TextureMailboxDeleter); 130 texture_mailbox_deleter_ = make_scoped_ptr(new TextureMailboxDeleter);
131 131
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 output_surface_.reset(new PixelTestOutputSurface(device.Pass())); 165 output_surface_.reset(new PixelTestOutputSurface(device.Pass()));
166 output_surface_->BindToClient(output_surface_client_.get()); 166 output_surface_->BindToClient(output_surface_client_.get());
167 resource_provider_ = 167 resource_provider_ =
168 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1); 168 ResourceProvider::Create(output_surface_.get(), NULL, 0, false, 1);
169 renderer_ = SoftwareRenderer::Create( 169 renderer_ = SoftwareRenderer::Create(
170 this, &settings_, output_surface_.get(), resource_provider_.get()) 170 this, &settings_, output_surface_.get(), resource_provider_.get())
171 .PassAs<DirectRenderer>(); 171 .PassAs<DirectRenderer>();
172 } 172 }
173 173
174 } // namespace cc 174 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698