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

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

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 | « no previous file | cc/output/delegating_renderer.cc » ('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 #ifndef CC_OUTPUT_DELEGATING_RENDERER_H_ 5 #ifndef CC_OUTPUT_DELEGATING_RENDERER_H_
6 #define CC_OUTPUT_DELEGATING_RENDERER_H_ 6 #define CC_OUTPUT_DELEGATING_RENDERER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 #include "cc/output/compositor_frame.h" 12 #include "cc/output/compositor_frame.h"
13 #include "cc/output/renderer.h" 13 #include "cc/output/renderer.h"
14 14
15 namespace cc { 15 namespace cc {
16 16
17 class OutputSurface; 17 class OutputSurface;
18 class ResourceProvider; 18 class ResourceProvider;
19 19
20 class CC_EXPORT DelegatingRenderer : public Renderer { 20 class CC_EXPORT DelegatingRenderer : public Renderer {
21 public: 21 public:
22 static std::unique_ptr<DelegatingRenderer> Create( 22 DelegatingRenderer(RendererClient* client,
23 RendererClient* client, 23 const RendererSettings* settings,
24 const RendererSettings* settings, 24 OutputSurface* output_surface,
25 OutputSurface* output_surface, 25 ResourceProvider* resource_provider);
26 ResourceProvider* resource_provider);
27 ~DelegatingRenderer() override; 26 ~DelegatingRenderer() override;
28 27
29 const RendererCapabilitiesImpl& Capabilities() const override; 28 const RendererCapabilitiesImpl& Capabilities() const override;
30 29
31 void DrawFrame(RenderPassList* render_passes_in_draw_order, 30 void DrawFrame(RenderPassList* render_passes_in_draw_order,
32 float device_scale_factor, 31 float device_scale_factor,
33 const gfx::ColorSpace& device_color_space, 32 const gfx::ColorSpace& device_color_space,
34 const gfx::Rect& device_viewport_rect, 33 const gfx::Rect& device_viewport_rect,
35 const gfx::Rect& device_clip_rect) override; 34 const gfx::Rect& device_clip_rect) override;
36 35
37 void Finish() override {} 36 void Finish() override {}
38 37
39 void SwapBuffers(CompositorFrameMetadata metadata) override; 38 void SwapBuffers(CompositorFrameMetadata metadata) override;
40 void ReclaimResources(const ReturnedResourceArray&) override; 39 void ReclaimResources(const ReturnedResourceArray&) override;
41 40
42 private: 41 private:
43 DelegatingRenderer(RendererClient* client,
44 const RendererSettings* settings,
45 OutputSurface* output_surface,
46 ResourceProvider* resource_provider);
47
48 void DidChangeVisibility() override; 42 void DidChangeVisibility() override;
49 43
50 OutputSurface* output_surface_; 44 OutputSurface* output_surface_;
51 ResourceProvider* resource_provider_; 45 ResourceProvider* resource_provider_;
52 RendererCapabilitiesImpl capabilities_; 46 RendererCapabilitiesImpl capabilities_;
53 std::unique_ptr<DelegatedFrameData> delegated_frame_data_; 47 std::unique_ptr<DelegatedFrameData> delegated_frame_data_;
54 48
55 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer); 49 DISALLOW_COPY_AND_ASSIGN(DelegatingRenderer);
56 }; 50 };
57 51
58 } // namespace cc 52 } // namespace cc
59 53
60 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_ 54 #endif // CC_OUTPUT_DELEGATING_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/output/delegating_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698