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

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

Issue 1769913003: sync compositor: Add output_surface_id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittests compile Created 4 years, 9 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 "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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::SurfaceId surface_id, 51 void SetBeginFrameSource(cc::SurfaceId surface_id,
52 cc::BeginFrameSource* begin_frame_source) override; 52 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 unsigned int compositor_routing_id); 56 unsigned int compositor_routing_id,
57 uint32_t output_surface_id);
57 58
58 SharedRendererState* shared_renderer_state_; 59 SharedRendererState* shared_renderer_state_;
59 60
60 typedef void* EGLContext; 61 typedef void* EGLContext;
61 EGLContext last_egl_context_; 62 EGLContext last_egl_context_;
62 63
63 // Information about last delegated frame. 64 // Information about last delegated frame.
64 gfx::Size frame_size_; 65 gfx::Size frame_size_;
65 66
66 // Infromation from UI on last commit. 67 // Infromation from UI on last commit.
67 gfx::Vector2d scroll_offset_; 68 gfx::Vector2d scroll_offset_;
68 69
69 // This holds the last ChildFrame received. Contains the frame info of the 70 // This holds the last ChildFrame received. Contains the frame info of the
70 // last frame. The |frame| member may be null if it's already submitted to 71 // last frame. The |frame| member may be null if it's already submitted to
71 // SurfaceFactory. 72 // SurfaceFactory.
72 scoped_ptr<ChildFrame> child_frame_; 73 scoped_ptr<ChildFrame> child_frame_;
73 74
74 scoped_refptr<AwGLSurface> gl_surface_; 75 scoped_refptr<AwGLSurface> gl_surface_;
75 76
76 scoped_ptr<cc::SurfaceManager> surface_manager_; 77 scoped_ptr<cc::SurfaceManager> surface_manager_;
77 scoped_ptr<cc::Display> display_; 78 scoped_ptr<cc::Display> display_;
78 scoped_ptr<cc::SurfaceFactory> surface_factory_; 79 scoped_ptr<cc::SurfaceFactory> surface_factory_;
79 scoped_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; 80 scoped_ptr<cc::SurfaceIdAllocator> surface_id_allocator_;
80 cc::SurfaceId child_id_; 81 cc::SurfaceId child_id_;
81 cc::SurfaceId root_id_; 82 cc::SurfaceId root_id_;
82 unsigned int compositor_id_; 83 unsigned int compositor_id_;
84 uint32_t output_surface_id_;
83 85
84 // This is owned by |display_|. 86 // This is owned by |display_|.
85 ParentOutputSurface* output_surface_; 87 ParentOutputSurface* output_surface_;
86 88
87 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer); 89 DISALLOW_COPY_AND_ASSIGN(HardwareRenderer);
88 }; 90 };
89 91
90 } // namespace android_webview 92 } // namespace android_webview
91 93
92 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_ 94 #endif // ANDROID_WEBVIEW_BROWSER_HARDWARE_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698