OLD | NEW |
---|---|
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 "android_webview/browser/shared_renderer_state.h" | 8 #include "android_webview/browser/shared_renderer_state.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 void CommitVSyncParameters(base::TimeTicks timebase, | 44 void CommitVSyncParameters(base::TimeTicks timebase, |
45 base::TimeDelta interval) override {} | 45 base::TimeDelta interval) override {} |
46 void OutputSurfaceLost() override {} | 46 void OutputSurfaceLost() override {} |
47 void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override {} | 47 void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override {} |
48 | 48 |
49 // cc::SurfaceFactoryClient implementation. | 49 // cc::SurfaceFactoryClient implementation. |
50 void ReturnResources(const cc::ReturnedResourceArray& resources) override; | 50 void ReturnResources(const cc::ReturnedResourceArray& resources) override; |
51 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; | 51 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; |
52 | 52 |
53 void ReturnResourcesInChildFrame(); | 53 void ReturnResourcesInChildFrame(); |
54 void ReturnResourcesToCompositor(const cc::ReturnedResourceArray& resources, | 54 void ReturnResourcesToCompositor(const cc::ReturnedResourceArray& resources, |
hush (inactive)
2016/03/21 20:43:55
while you are at it, can you turn this function to
boliu
2016/03/21 21:35:49
Already private?
| |
55 uint32_t compositor_routing_id); | 55 uint32_t compositor_routing_id, |
56 uint32_t output_surface_id); | |
56 | 57 |
57 SharedRendererState* shared_renderer_state_; | 58 SharedRendererState* shared_renderer_state_; |
58 | 59 |
59 typedef void* EGLContext; | 60 typedef void* EGLContext; |
60 EGLContext last_egl_context_; | 61 EGLContext last_egl_context_; |
61 | 62 |
62 // Information about last delegated frame. | 63 // Information about last delegated frame. |
63 gfx::Size frame_size_; | 64 gfx::Size frame_size_; |
64 | 65 |
65 // Infromation from UI on last commit. | 66 // Infromation from UI on last commit. |
66 gfx::Vector2d scroll_offset_; | 67 gfx::Vector2d scroll_offset_; |
67 | 68 |
68 // This holds the last ChildFrame received. Contains the frame info of the | 69 // This holds the last ChildFrame received. Contains the frame info of the |
69 // last frame. The |frame| member may be null if it's already submitted to | 70 // last frame. The |frame| member may be null if it's already submitted to |
70 // SurfaceFactory. | 71 // SurfaceFactory. |
71 scoped_ptr<ChildFrame> child_frame_; | 72 scoped_ptr<ChildFrame> child_frame_; |
72 | 73 |
73 scoped_refptr<AwGLSurface> gl_surface_; | 74 scoped_refptr<AwGLSurface> gl_surface_; |
74 | 75 |
75 scoped_ptr<cc::SurfaceManager> surface_manager_; | 76 scoped_ptr<cc::SurfaceManager> surface_manager_; |
76 scoped_ptr<cc::Display> display_; | 77 scoped_ptr<cc::Display> display_; |
77 scoped_ptr<cc::SurfaceFactory> surface_factory_; | 78 scoped_ptr<cc::SurfaceFactory> surface_factory_; |
78 scoped_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; | 79 scoped_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; |
79 cc::SurfaceId child_id_; | 80 cc::SurfaceId child_id_; |
80 cc::SurfaceId root_id_; | 81 cc::SurfaceId root_id_; |
81 uint32_t compositor_id_; | 82 uint32_t compositor_id_; |
83 // HardwareRenderer guarantees resources are returned in the order of | |
84 // output_surface_id, and resources for old output surfaces are dropped. | |
85 uint32_t last_committed_output_surface_id_; | |
86 uint32_t last_submitted_output_surface_id_; | |
82 | 87 |
83 // This is owned by |display_|. | 88 // This is owned by |display_|. |
84 ParentOutputSurface* output_surface_; | 89 ParentOutputSurface* output_surface_; |
85 | 90 |
86 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); | 91 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); |
87 }; | 92 }; |
88 | 93 |
89 } // namespace android_webview | 94 } // namespace android_webview |
90 | 95 |
91 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ | 96 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ |
OLD | NEW |