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

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

Issue 2034583002: Initialize the Display's renderer when the Display is initialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@displaytest
Patch Set: displayinit: . 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/gl_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 std::unique_ptr<DelegatingRenderer> DelegatingRenderer::Create(
24 RendererClient* client,
25 const RendererSettings* settings,
26 OutputSurface* output_surface,
27 ResourceProvider* resource_provider) {
28 return base::WrapUnique(new DelegatingRenderer(
29 client, settings, output_surface, resource_provider));
30 }
31
32 DelegatingRenderer::DelegatingRenderer(RendererClient* client, 23 DelegatingRenderer::DelegatingRenderer(RendererClient* client,
33 const RendererSettings* settings, 24 const RendererSettings* settings,
34 OutputSurface* output_surface, 25 OutputSurface* output_surface,
35 ResourceProvider* resource_provider) 26 ResourceProvider* resource_provider)
36 : Renderer(client, settings), 27 : Renderer(client, settings),
37 output_surface_(output_surface), 28 output_surface_(output_surface),
38 resource_provider_(resource_provider) { 29 resource_provider_(resource_provider) {
39 DCHECK(resource_provider_); 30 DCHECK(resource_provider_);
40 31
41 capabilities_.using_partial_swap = false; 32 capabilities_.using_partial_swap = false;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 111 }
121 } 112 }
122 if (context_provider) { 113 if (context_provider) {
123 // If we are not visible, we ask the context to aggressively free resources. 114 // If we are not visible, we ask the context to aggressively free resources.
124 context_provider->ContextSupport()->SetAggressivelyFreeResources( 115 context_provider->ContextSupport()->SetAggressivelyFreeResources(
125 !visible()); 116 !visible());
126 } 117 }
127 } 118 }
128 119
129 } // namespace cc 120 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/delegating_renderer.h ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698