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

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

Issue 2347563003: Added FrameFuture class (Closed)
Patch Set: Code review Created 4 years, 3 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/compositor_id.h" 10 #include "android_webview/browser/compositor_id.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.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 CompositorFrame;
19 class Display; 20 class Display;
20 class SurfaceFactory; 21 class SurfaceFactory;
21 class SurfaceIdAllocator; 22 class SurfaceIdAllocator;
22 class SurfaceManager; 23 class SurfaceManager;
23 } 24 }
24 25
25 namespace android_webview { 26 namespace android_webview {
26 27
27 class ChildFrame; 28 class ChildFrame;
28 class RenderThreadManager; 29 class RenderThreadManager;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Information about last delegated frame. 61 // Information about last delegated frame.
61 gfx::Size frame_size_; 62 gfx::Size frame_size_;
62 63
63 // Infromation from UI on last commit. 64 // Infromation from UI on last commit.
64 gfx::Vector2d scroll_offset_; 65 gfx::Vector2d scroll_offset_;
65 66
66 // This holds the last ChildFrame received. Contains the frame info of the 67 // This holds the last ChildFrame received. Contains the frame info of the
67 // last frame. The |frame| member may be null if it's already submitted to 68 // last frame. The |frame| member may be null if it's already submitted to
68 // SurfaceFactory. 69 // SurfaceFactory.
69 std::unique_ptr<ChildFrame> child_frame_; 70 std::unique_ptr<ChildFrame> child_frame_;
71 uint32_t compositor_frame_sink_id_;
72 std::unique_ptr<cc::CompositorFrame> frame_;
70 73
71 const scoped_refptr<SurfacesInstance> surfaces_; 74 const scoped_refptr<SurfacesInstance> surfaces_;
72 const std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; 75 const std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_;
73 std::unique_ptr<cc::SurfaceFactory> surface_factory_; 76 std::unique_ptr<cc::SurfaceFactory> surface_factory_;
74 cc::SurfaceId child_id_; 77 cc::SurfaceId child_id_;
75 CompositorID compositor_id_; 78 CompositorID compositor_id_;
76 // HardwareRenderer guarantees resources are returned in the order of 79 // HardwareRenderer guarantees resources are returned in the order of
77 // compositor_frame_sink_id, and resources for old output surfaces are 80 // compositor_frame_sink_id, and resources for old output surfaces are
78 // dropped. 81 // dropped.
79 uint32_t last_committed_compositor_frame_sink_id_; 82 uint32_t last_committed_compositor_frame_sink_id_;
80 uint32_t last_submitted_compositor_frame_sink_id_; 83 uint32_t last_submitted_compositor_frame_sink_id_;
81 84
82 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); 85 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer);
83 }; 86 };
84 87
85 } // namespace android_webview 88 } // namespace android_webview
86 89
87 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ 90 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698