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

Side by Side Diff: cc/output/delegating_renderer.cc

Issue 2254543003: cc: Delete the RendererClient class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@setvisible-browser
Patch Set: deleterendererclient: rebase Created 4 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
« no previous file with comments | « cc/output/delegating_renderer.h ('k') | cc/output/direct_renderer.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/output/delegating_renderer.h" 5 #include "cc/output/delegating_renderer.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/trace_event/trace_event.h" 12 #include "base/trace_event/trace_event.h"
13 #include "cc/output/context_provider.h" 13 #include "cc/output/context_provider.h"
14 #include "cc/quads/draw_quad.h" 14 #include "cc/quads/draw_quad.h"
15 #include "cc/quads/render_pass.h" 15 #include "cc/quads/render_pass.h"
16 #include "cc/resources/resource_provider.h" 16 #include "cc/resources/resource_provider.h"
17 #include "gpu/command_buffer/client/context_support.h" 17 #include "gpu/command_buffer/client/context_support.h"
18 #include "gpu/command_buffer/client/gles2_interface.h" 18 #include "gpu/command_buffer/client/gles2_interface.h"
19 19
20 20
21 namespace cc { 21 namespace cc {
22 22
23 DelegatingRenderer::DelegatingRenderer(RendererClient* client, 23 DelegatingRenderer::DelegatingRenderer(const RendererSettings* settings,
24 const RendererSettings* settings,
25 OutputSurface* output_surface, 24 OutputSurface* output_surface,
26 ResourceProvider* resource_provider) 25 ResourceProvider* resource_provider)
27 : Renderer(client, settings), 26 : Renderer(settings),
28 output_surface_(output_surface), 27 output_surface_(output_surface),
29 resource_provider_(resource_provider) { 28 resource_provider_(resource_provider) {
30 DCHECK(resource_provider_); 29 DCHECK(resource_provider_);
31 30
32 capabilities_.using_partial_swap = false; 31 capabilities_.using_partial_swap = false;
33 capabilities_.max_texture_size = resource_provider_->max_texture_size(); 32 capabilities_.max_texture_size = resource_provider_->max_texture_size();
34 capabilities_.best_texture_format = resource_provider_->best_texture_format(); 33 capabilities_.best_texture_format = resource_provider_->best_texture_format();
35 capabilities_.allow_partial_texture_updates = 34 capabilities_.allow_partial_texture_updates =
36 output_surface->capabilities().can_force_reclaim_resources; 35 output_surface->capabilities().can_force_reclaim_resources;
37 36
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 compositor_frame.delegated_frame_data = std::move(delegated_frame_data_); 94 compositor_frame.delegated_frame_data = std::move(delegated_frame_data_);
96 output_surface_->SwapBuffers(std::move(compositor_frame)); 95 output_surface_->SwapBuffers(std::move(compositor_frame));
97 } 96 }
98 97
99 void DelegatingRenderer::ReclaimResources( 98 void DelegatingRenderer::ReclaimResources(
100 const ReturnedResourceArray& resources) { 99 const ReturnedResourceArray& resources) {
101 resource_provider_->ReceiveReturnsFromParent(resources); 100 resource_provider_->ReceiveReturnsFromParent(resources);
102 } 101 }
103 102
104 } // namespace cc 103 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/delegating_renderer.h ('k') | cc/output/direct_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698