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

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

Issue 2337913003: Fork cc::OutputSurface into cc::CompositorFrameSink. (Closed)
Patch Set: cfsfork: android-vulkan 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"
(...skipping 29 matching lines...) Expand all
40 void SetBackingFrameBufferObject(int framebuffer_binding_ext); 40 void SetBackingFrameBufferObject(int framebuffer_binding_ext);
41 41
42 private: 42 private:
43 // cc::SurfaceFactoryClient implementation. 43 // cc::SurfaceFactoryClient implementation.
44 void ReturnResources(const cc::ReturnedResourceArray& resources) override; 44 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
45 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; 45 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
46 46
47 void ReturnResourcesInChildFrame(); 47 void ReturnResourcesInChildFrame();
48 void ReturnResourcesToCompositor(const cc::ReturnedResourceArray& resources, 48 void ReturnResourcesToCompositor(const cc::ReturnedResourceArray& resources,
49 const CompositorID& compositor_id, 49 const CompositorID& compositor_id,
50 uint32_t output_surface_id); 50 uint32_t compositor_frame_sink_id);
51 51
52 void AllocateSurface(); 52 void AllocateSurface();
53 void DestroySurface(); 53 void DestroySurface();
54 54
55 RenderThreadManager* render_thread_manager_; 55 RenderThreadManager* render_thread_manager_;
56 56
57 typedef void* EGLContext; 57 typedef void* EGLContext;
58 EGLContext last_egl_context_; 58 EGLContext last_egl_context_;
59 59
60 // Information about last delegated frame. 60 // Information about last delegated frame.
61 gfx::Size frame_size_; 61 gfx::Size frame_size_;
62 62
63 // Infromation from UI on last commit. 63 // Infromation from UI on last commit.
64 gfx::Vector2d scroll_offset_; 64 gfx::Vector2d scroll_offset_;
65 65
66 // This holds the last ChildFrame received. Contains the frame info of the 66 // 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 67 // last frame. The |frame| member may be null if it's already submitted to
68 // SurfaceFactory. 68 // SurfaceFactory.
69 std::unique_ptr<ChildFrame> child_frame_; 69 std::unique_ptr<ChildFrame> child_frame_;
70 70
71 const scoped_refptr<SurfacesInstance> surfaces_; 71 const scoped_refptr<SurfacesInstance> surfaces_;
72 const std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; 72 const std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_;
73 std::unique_ptr<cc::SurfaceFactory> surface_factory_; 73 std::unique_ptr<cc::SurfaceFactory> surface_factory_;
74 cc::SurfaceId child_id_; 74 cc::SurfaceId child_id_;
75 CompositorID compositor_id_; 75 CompositorID compositor_id_;
76 // HardwareRenderer guarantees resources are returned in the order of 76 // HardwareRenderer guarantees resources are returned in the order of
77 // output_surface_id, and resources for old output surfaces are dropped. 77 // compositor_frame_sink_id, and resources for old output surfaces are
78 uint32_t last_committed_output_surface_id_; 78 // dropped.
79 uint32_t last_submitted_output_surface_id_; 79 uint32_t last_committed_compositor_frame_sink_id_;
80 uint32_t last_submitted_compositor_frame_sink_id_;
80 81
81 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); 82 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer);
82 }; 83 };
83 84
84 } // namespace android_webview 85 } // namespace android_webview
85 86
86 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ 87 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_
OLDNEW
« no previous file with comments | « android_webview/browser/compositor_frame_consumer.h ('k') | android_webview/browser/hardware_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698