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

Unified Diff: android_webview/browser/shared_renderer_state.h

Issue 1769913003: sync compositor: Add output_surface_id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nit in test 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/browser/hardware_renderer.cc ('k') | android_webview/browser/shared_renderer_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/shared_renderer_state.h
diff --git a/android_webview/browser/shared_renderer_state.h b/android_webview/browser/shared_renderer_state.h
index a6f3e0bea996b8ea8a2e355af8bf3b76be829923..a2313a58ea63dd93c22f729fe75841b29fc953b9 100644
--- a/android_webview/browser/shared_renderer_state.h
+++ b/android_webview/browser/shared_renderer_state.h
@@ -34,6 +34,15 @@ class InsideHardwareReleaseReset;
// This class is used to pass data between UI thread and RenderThread.
class SharedRendererState {
public:
+ struct ReturnedResources {
+ ReturnedResources();
+ ~ReturnedResources();
+
+ uint32_t output_surface_id;
+ cc::ReturnedResourceArray resources;
+ };
+ using ReturnedResourcesMap = std::map<uint32_t, ReturnedResources>;
+
SharedRendererState(
const scoped_refptr<base::SingleThreadTaskRunner>& ui_loop,
BrowserViewRenderer* browser_view_renderer);
@@ -48,8 +57,7 @@ class SharedRendererState {
void InitializeHardwareDrawIfNeededOnUI();
void ReleaseHardwareDrawIfNeededOnUI();
ParentCompositorDrawConstraints GetParentDrawConstraintsOnUI() const;
- void SwapReturnedResourcesOnUI(
- std::map<uint32_t, cc::ReturnedResourceArray>* returned_resource_map);
+ void SwapReturnedResourcesOnUI(ReturnedResourcesMap* returned_resource_map);
bool ReturnedResourcesEmptyOnUI() const;
scoped_ptr<ChildFrame> PassUncommittedFrameOnUI();
void DeleteHardwareRendererOnUI();
@@ -62,7 +70,8 @@ class SharedRendererState {
void PostExternalDrawConstraintsToChildCompositorOnRT(
const ParentCompositorDrawConstraints& parent_draw_constraints);
void InsertReturnedResourcesOnRT(const cc::ReturnedResourceArray& resources,
- uint32_t compositor_id);
+ uint32_t compositor_id,
+ uint32_t output_surface_id);
private:
friend class internal::RequestDrawGLTracker;
@@ -106,8 +115,7 @@ class SharedRendererState {
scoped_ptr<ChildFrame> child_frame_;
bool inside_hardware_release_;
ParentCompositorDrawConstraints parent_draw_constraints_;
- // A map from compositor's ID to the resources that belong to the compositor.
- std::map<uint32_t, cc::ReturnedResourceArray> returned_resources_map_;
+ ReturnedResourcesMap returned_resources_map_;
base::Closure request_draw_gl_closure_;
base::WeakPtrFactory<SharedRendererState> weak_factory_on_ui_thread_;
« no previous file with comments | « android_webview/browser/hardware_renderer.cc ('k') | android_webview/browser/shared_renderer_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698