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

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

Issue 2009443002: Revert of Consolidate OutputSurface constructors into GL vs Vulkan. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | components/display_compositor/BUILD.gn » ('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_output_surface.h" 5 #include "cc/test/pixel_test_output_surface.h"
6 6
7 #include <utility>
8
9 #include "cc/output/output_surface_client.h" 7 #include "cc/output/output_surface_client.h"
10 #include "cc/scheduler/begin_frame_source.h" 8 #include "cc/scheduler/begin_frame_source.h"
11 #include "ui/gfx/transform.h" 9 #include "ui/gfx/transform.h"
12 10
13 namespace cc { 11 namespace cc {
14 12
15 PixelTestOutputSurface::PixelTestOutputSurface( 13 PixelTestOutputSurface::PixelTestOutputSurface(
16 scoped_refptr<ContextProvider> context_provider, 14 scoped_refptr<ContextProvider> context_provider,
17 scoped_refptr<ContextProvider> worker_context_provider, 15 scoped_refptr<ContextProvider> worker_context_provider,
18 bool flipped_output_surface, 16 bool flipped_output_surface,
19 std::unique_ptr<BeginFrameSource> begin_frame_source) 17 std::unique_ptr<BeginFrameSource> begin_frame_source)
20 : OutputSurface(std::move(context_provider), 18 : OutputSurface(context_provider, worker_context_provider),
21 std::move(worker_context_provider),
22 nullptr),
23 begin_frame_source_(std::move(begin_frame_source)), 19 begin_frame_source_(std::move(begin_frame_source)),
24 external_stencil_test_(false) { 20 external_stencil_test_(false) {
25 capabilities_.adjust_deadline_for_parent = false; 21 capabilities_.adjust_deadline_for_parent = false;
26 capabilities_.flipped_output_surface = flipped_output_surface; 22 capabilities_.flipped_output_surface = flipped_output_surface;
27 } 23 }
28 24
29 PixelTestOutputSurface::PixelTestOutputSurface( 25 PixelTestOutputSurface::PixelTestOutputSurface(
30 scoped_refptr<ContextProvider> context_provider, 26 scoped_refptr<ContextProvider> context_provider,
31 bool flipped_output_surface, 27 bool flipped_output_surface,
32 std::unique_ptr<BeginFrameSource> begin_frame_source) 28 std::unique_ptr<BeginFrameSource> begin_frame_source)
33 : PixelTestOutputSurface(std::move(context_provider), 29 : PixelTestOutputSurface(context_provider,
34 nullptr, 30 nullptr,
35 flipped_output_surface, 31 flipped_output_surface,
36 std::move(begin_frame_source)) {} 32 std::move(begin_frame_source)) {}
37 33
38 PixelTestOutputSurface::PixelTestOutputSurface( 34 PixelTestOutputSurface::PixelTestOutputSurface(
39 std::unique_ptr<SoftwareOutputDevice> software_device, 35 std::unique_ptr<SoftwareOutputDevice> software_device,
40 std::unique_ptr<BeginFrameSource> begin_frame_source) 36 std::unique_ptr<BeginFrameSource> begin_frame_source)
41 : OutputSurface(nullptr, nullptr, std::move(software_device)), 37 : OutputSurface(std::move(software_device)),
42 begin_frame_source_(std::move(begin_frame_source)), 38 begin_frame_source_(std::move(begin_frame_source)),
43 external_stencil_test_(false) {} 39 external_stencil_test_(false) {}
44 40
45 PixelTestOutputSurface::~PixelTestOutputSurface() {} 41 PixelTestOutputSurface::~PixelTestOutputSurface() {}
46 42
47 bool PixelTestOutputSurface::BindToClient(OutputSurfaceClient* client) { 43 bool PixelTestOutputSurface::BindToClient(OutputSurfaceClient* client) {
48 if (!OutputSurface::BindToClient(client)) 44 if (!OutputSurface::BindToClient(client))
49 return false; 45 return false;
50 46
51 // TODO(enne): Once the renderer uses begin frame sources, this will 47 // TODO(enne): Once the renderer uses begin frame sources, this will
(...skipping 14 matching lines...) Expand all
66 bool PixelTestOutputSurface::HasExternalStencilTest() const { 62 bool PixelTestOutputSurface::HasExternalStencilTest() const {
67 return external_stencil_test_; 63 return external_stencil_test_;
68 } 64 }
69 65
70 void PixelTestOutputSurface::SwapBuffers(CompositorFrame* frame) { 66 void PixelTestOutputSurface::SwapBuffers(CompositorFrame* frame) {
71 PostSwapBuffersComplete(); 67 PostSwapBuffersComplete();
72 client_->DidSwapBuffers(); 68 client_->DidSwapBuffers();
73 } 69 }
74 70
75 } // namespace cc 71 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | components/display_compositor/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698