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

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

Issue 2337913003: Fork cc::OutputSurface into cc::CompositorFrameSink. (Closed)
Patch Set: cfsfork: android-vulkan Created 4 years, 3 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.h ('k') | cc/test/fake_proxy.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/fake_output_surface.h" 5 #include "cc/test/fake_output_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "cc/output/output_surface_client.h" 9 #include "cc/output/output_surface_client.h"
10 #include "cc/resources/returned_resource.h" 10 #include "cc/resources/returned_resource.h"
(...skipping 12 matching lines...) Expand all
23 delegated_rendering) {} 23 delegated_rendering) {}
24 24
25 FakeOutputSurface::FakeOutputSurface( 25 FakeOutputSurface::FakeOutputSurface(
26 scoped_refptr<ContextProvider> context_provider, 26 scoped_refptr<ContextProvider> context_provider,
27 scoped_refptr<ContextProvider> worker_context_provider, 27 scoped_refptr<ContextProvider> worker_context_provider,
28 std::unique_ptr<SoftwareOutputDevice> software_device, 28 std::unique_ptr<SoftwareOutputDevice> software_device,
29 bool delegated_rendering) 29 bool delegated_rendering)
30 : OutputSurface(std::move(context_provider), 30 : OutputSurface(std::move(context_provider),
31 std::move(worker_context_provider), 31 std::move(worker_context_provider),
32 std::move(software_device)) { 32 std::move(software_device)) {
33 capabilities_.delegated_rendering = delegated_rendering; 33 capabilities_.delegated_rendering = false;
34 } 34 }
35 35
36 FakeOutputSurface::~FakeOutputSurface() = default; 36 FakeOutputSurface::~FakeOutputSurface() = default;
37 37
38 void FakeOutputSurface::SwapBuffers(CompositorFrame frame) { 38 void FakeOutputSurface::SwapBuffers(CompositorFrame frame) {
39 ReturnResourcesHeldByParent(); 39 ReturnResourcesHeldByParent();
40 40
41 last_sent_frame_.reset(new CompositorFrame(std::move(frame))); 41 last_sent_frame_.reset(new CompositorFrame(std::move(frame)));
42 ++num_sent_frames_; 42 ++num_sent_frames_;
43 43
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // Return the last frame's resources immediately. 116 // Return the last frame's resources immediately.
117 ReturnedResourceArray resources; 117 ReturnedResourceArray resources;
118 for (const auto& resource : resources_held_by_parent_) 118 for (const auto& resource : resources_held_by_parent_)
119 resources.push_back(resource.ToReturnedResource()); 119 resources.push_back(resource.ToReturnedResource());
120 resources_held_by_parent_.clear(); 120 resources_held_by_parent_.clear();
121 client_->ReclaimResources(resources); 121 client_->ReclaimResources(resources);
122 } 122 }
123 } 123 }
124 124
125 } // namespace cc 125 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface.h ('k') | cc/test/fake_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698