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

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

Issue 20185002: ContextProvider in OutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: contextprovider: don't access Context3d() in OutputSurface contructors, it's not bound yet Created 7 years, 4 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/layer_tree_test.cc ('k') | cc/test/pixel_test_output_surface.h » ('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/pixel_test.h" 5 #include "cc/test/pixel_test.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "cc/output/compositor_frame_metadata.h" 9 #include "cc/output/compositor_frame_metadata.h"
10 #include "cc/output/copy_output_request.h" 10 #include "cc/output/copy_output_request.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 return MatchesPNGFile(*result_bitmap_, 142 return MatchesPNGFile(*result_bitmap_,
143 test_data_dir.Append(ref_file), 143 test_data_dir.Append(ref_file),
144 comparator); 144 comparator);
145 } 145 }
146 146
147 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) { 147 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend) {
148 CHECK(fake_client_); 148 CHECK(fake_client_);
149 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL)); 149 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL));
150 150
151 using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; 151 using webkit::gpu::ContextProviderInProcess;
152 scoped_ptr<WebKit::WebGraphicsContext3D> context3d(
153 WebGraphicsContext3DInProcessCommandBufferImpl::CreateOffscreenContext(
154 WebKit::WebGraphicsContext3D::Attributes()));
155 output_surface_.reset(new PixelTestOutputSurface( 152 output_surface_.reset(new PixelTestOutputSurface(
156 context3d.PassAs<WebKit::WebGraphicsContext3D>())); 153 ContextProviderInProcess::CreateOffscreen()));
157 output_surface_->BindToClient(fake_client_.get()); 154 output_surface_->BindToClient(fake_client_.get());
158 155
159 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); 156 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0);
160 renderer_ = GLRenderer::Create(fake_client_.get(), 157 renderer_ = GLRenderer::Create(fake_client_.get(),
161 output_surface_.get(), 158 output_surface_.get(),
162 resource_provider_.get(), 159 resource_provider_.get(),
163 0, 160 0,
164 use_skia_gpu_backend).PassAs<DirectRenderer>(); 161 use_skia_gpu_backend).PassAs<DirectRenderer>();
165 162
166 scoped_refptr<webkit::gpu::ContextProviderInProcess> offscreen_contexts = 163 scoped_refptr<webkit::gpu::ContextProviderInProcess> offscreen_contexts =
(...skipping 26 matching lines...) Expand all
193 output_surface_.reset(new PixelTestOutputSurface(device.Pass())); 190 output_surface_.reset(new PixelTestOutputSurface(device.Pass()));
194 output_surface_->BindToClient(fake_client_.get()); 191 output_surface_->BindToClient(fake_client_.get());
195 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); 192 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0);
196 renderer_ = SoftwareRenderer::Create( 193 renderer_ = SoftwareRenderer::Create(
197 fake_client_.get(), 194 fake_client_.get(),
198 output_surface_.get(), 195 output_surface_.get(),
199 resource_provider_.get()).PassAs<DirectRenderer>(); 196 resource_provider_.get()).PassAs<DirectRenderer>();
200 } 197 }
201 198
202 } // namespace cc 199 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/test/pixel_test_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698