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

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

Issue 1985973002: Defer compositor context creation to the thread. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: contextfactory: . Created 4 years, 7 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/layer_tree_pixel_test.h" 5 #include "cc/test/layer_tree_pixel_test.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 std::unique_ptr<PixelTestSoftwareOutputDevice> software_output_device( 47 std::unique_ptr<PixelTestSoftwareOutputDevice> software_output_device(
48 new PixelTestSoftwareOutputDevice); 48 new PixelTestSoftwareOutputDevice);
49 software_output_device->set_surface_expansion_size( 49 software_output_device->set_surface_expansion_size(
50 surface_expansion_size); 50 surface_expansion_size);
51 output_surface = base::WrapUnique(new PixelTestOutputSurface( 51 output_surface = base::WrapUnique(new PixelTestOutputSurface(
52 std::move(software_output_device), nullptr)); 52 std::move(software_output_device), nullptr));
53 break; 53 break;
54 } 54 }
55 case PIXEL_TEST_GL: { 55 case PIXEL_TEST_GL: {
56 bool flipped_output_surface = false; 56 bool flipped_output_surface = false;
57 scoped_refptr<TestInProcessContextProvider> compositor( 57 scoped_refptr<TestInProcessContextProvider> worker(
58 new TestInProcessContextProvider(nullptr)); 58 new TestInProcessContextProvider(nullptr));
59 scoped_refptr<TestInProcessContextProvider> worker( 59 std::unique_ptr<TestInProcessContextProvider::Factory> compositor(
60 new TestInProcessContextProvider(compositor.get())); 60 new TestInProcessContextProvider::Factory(worker.get()));
61 output_surface = base::WrapUnique( 61 output_surface = base::WrapUnique(
62 new PixelTestOutputSurface(std::move(compositor), std::move(worker), 62 new PixelTestOutputSurface(std::move(compositor), std::move(worker),
63 flipped_output_surface, nullptr)); 63 flipped_output_surface, nullptr));
64 break; 64 break;
65 } 65 }
66 } 66 }
67 67
68 output_surface->set_surface_expansion_size(surface_expansion_size); 68 output_surface->set_surface_expansion_size(surface_expansion_size);
69 return std::move(output_surface); 69 return std::move(output_surface);
70 } 70 }
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 } 276 }
277 277
278 void LayerTreePixelTest::Finish() { 278 void LayerTreePixelTest::Finish() {
279 std::unique_ptr<gpu::GLInProcessContext> context = 279 std::unique_ptr<gpu::GLInProcessContext> context =
280 CreateTestInProcessContext(); 280 CreateTestInProcessContext();
281 GLES2Interface* gl = context->GetImplementation(); 281 GLES2Interface* gl = context->GetImplementation();
282 gl->Finish(); 282 gl->Finish();
283 } 283 }
284 284
285 } // namespace cc 285 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698