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

Side by Side Diff: android_webview/browser/hardware_renderer.h

Issue 1858853002: Rename SharedRendererState to RenderThreadManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix rebase Created 4 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_
6 #define ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ 6 #define ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "android_webview/browser/shared_renderer_state.h" 10 #include "android_webview/browser/render_thread_manager.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "cc/surfaces/display_client.h" 12 #include "cc/surfaces/display_client.h"
13 #include "cc/surfaces/surface_factory_client.h" 13 #include "cc/surfaces/surface_factory_client.h"
14 #include "cc/surfaces/surface_id.h" 14 #include "cc/surfaces/surface_id.h"
15 15
16 struct AwDrawGLInfo; 16 struct AwDrawGLInfo;
17 17
18 namespace cc { 18 namespace cc {
19 class Display; 19 class Display;
20 class SurfaceFactory; 20 class SurfaceFactory;
21 class SurfaceIdAllocator; 21 class SurfaceIdAllocator;
22 class SurfaceManager; 22 class SurfaceManager;
23 } 23 }
24 24
25 namespace android_webview { 25 namespace android_webview {
26 26
27 class AwGLSurface; 27 class AwGLSurface;
28 class ChildFrame; 28 class ChildFrame;
29 class ParentOutputSurface; 29 class ParentOutputSurface;
30 class ScopedAppGLStateRestore; 30 class ScopedAppGLStateRestore;
31 31
32 class HardwareRenderer : public cc::DisplayClient, 32 class HardwareRenderer : public cc::DisplayClient,
33 public cc::SurfaceFactoryClient { 33 public cc::SurfaceFactoryClient {
34 public: 34 public:
35 explicit HardwareRenderer(SharedRendererState* state); 35 explicit HardwareRenderer(RenderThreadManager* state);
36 ~HardwareRenderer() override; 36 ~HardwareRenderer() override;
37 37
38 void DrawGL(AwDrawGLInfo* draw_info, const ScopedAppGLStateRestore& gl_state); 38 void DrawGL(AwDrawGLInfo* draw_info, const ScopedAppGLStateRestore& gl_state);
39 void CommitFrame(); 39 void CommitFrame();
40 40
41 void SetBackingFrameBufferObject(int framebuffer_binding_ext); 41 void SetBackingFrameBufferObject(int framebuffer_binding_ext);
42 42
43 private: 43 private:
44 // cc::DisplayClient overrides. 44 // cc::DisplayClient overrides.
45 void CommitVSyncParameters(base::TimeTicks timebase, 45 void CommitVSyncParameters(base::TimeTicks timebase,
46 base::TimeDelta interval) override {} 46 base::TimeDelta interval) override {}
47 void OutputSurfaceLost() override {} 47 void OutputSurfaceLost() override {}
48 void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override {} 48 void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override {}
49 49
50 // cc::SurfaceFactoryClient implementation. 50 // cc::SurfaceFactoryClient implementation.
51 void ReturnResources(const cc::ReturnedResourceArray& resources) override; 51 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
52 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; 52 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
53 53
54 void ReturnResourcesInChildFrame(); 54 void ReturnResourcesInChildFrame();
55 void ReturnResourcesToCompositor(const cc::ReturnedResourceArray& resources, 55 void ReturnResourcesToCompositor(const cc::ReturnedResourceArray& resources,
56 uint32_t compositor_routing_id, 56 uint32_t compositor_routing_id,
57 uint32_t output_surface_id); 57 uint32_t output_surface_id);
58 58
59 SharedRendererState* shared_renderer_state_; 59 RenderThreadManager* render_thread_manager_;
60 60
61 typedef void* EGLContext; 61 typedef void* EGLContext;
62 EGLContext last_egl_context_; 62 EGLContext last_egl_context_;
63 63
64 // Information about last delegated frame. 64 // Information about last delegated frame.
65 gfx::Size frame_size_; 65 gfx::Size frame_size_;
66 66
67 // Infromation from UI on last commit. 67 // Infromation from UI on last commit.
68 gfx::Vector2d scroll_offset_; 68 gfx::Vector2d scroll_offset_;
69 69
(...skipping 18 matching lines...) Expand all
88 88
89 // This is owned by |display_|. 89 // This is owned by |display_|.
90 ParentOutputSurface* output_surface_; 90 ParentOutputSurface* output_surface_;
91 91
92 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); 92 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer);
93 }; 93 };
94 94
95 } // namespace android_webview 95 } // namespace android_webview
96 96
97 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ 97 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_
OLDNEW
« no previous file with comments | « android_webview/browser/gl_view_renderer_manager.h ('k') | android_webview/browser/hardware_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698