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

Side by Side Diff: content/browser/renderer_host/delegated_frame_host.h

Issue 2728183002: RendererCompositorFrameSink should handle local surface id allocation (Closed)
Patch Set: rebase Created 3 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 CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 16 matching lines...) Expand all
27 #include "ui/compositor/layer.h" 27 #include "ui/compositor/layer.h"
28 #include "ui/events/event.h" 28 #include "ui/events/event.h"
29 #include "ui/gfx/geometry/rect_conversions.h" 29 #include "ui/gfx/geometry/rect_conversions.h"
30 30
31 namespace base { 31 namespace base {
32 class TickClock; 32 class TickClock;
33 } 33 }
34 34
35 namespace cc { 35 namespace cc {
36 class CompositorFrameSinkSupport; 36 class CompositorFrameSinkSupport;
37 class LocalSurfaceIdAllocator;
38 } 37 }
39 38
40 namespace media { 39 namespace media {
41 class VideoFrame; 40 class VideoFrame;
42 } 41 }
43 42
44 namespace display_compositor { 43 namespace display_compositor {
45 class ReadbackYUVInterface; 44 class ReadbackYUVInterface;
46 } 45 }
47 46
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // cc::CompositorFrameSinkSupportClient implementation. 117 // cc::CompositorFrameSinkSupportClient implementation.
119 void DidReceiveCompositorFrameAck() override; 118 void DidReceiveCompositorFrameAck() override;
120 void OnBeginFrame(const cc::BeginFrameArgs& args) override; 119 void OnBeginFrame(const cc::BeginFrameArgs& args) override;
121 void ReclaimResources(const cc::ReturnedResourceArray& resources) override; 120 void ReclaimResources(const cc::ReturnedResourceArray& resources) override;
122 void WillDrawSurface(const cc::LocalSurfaceId& id, 121 void WillDrawSurface(const cc::LocalSurfaceId& id,
123 const gfx::Rect& damage_rect) override; 122 const gfx::Rect& damage_rect) override;
124 123
125 // Public interface exposed to RenderWidgetHostView. 124 // Public interface exposed to RenderWidgetHostView.
126 125
127 void SwapDelegatedFrame(uint32_t compositor_frame_sink_id, 126 void SwapDelegatedFrame(uint32_t compositor_frame_sink_id,
127 const cc::LocalSurfaceId& local_surface_id,
128 cc::CompositorFrame frame); 128 cc::CompositorFrame frame);
129 void ClearDelegatedFrame(); 129 void ClearDelegatedFrame();
130 void WasHidden(); 130 void WasHidden();
131 void WasShown(const ui::LatencyInfo& latency_info); 131 void WasShown(const ui::LatencyInfo& latency_info);
132 void WasResized(); 132 void WasResized();
133 bool HasSavedFrame(); 133 bool HasSavedFrame();
134 gfx::Size GetRequestedRendererSize() const; 134 gfx::Size GetRequestedRendererSize() const;
135 void SetCompositor(ui::Compositor* compositor); 135 void SetCompositor(ui::Compositor* compositor);
136 void ResetCompositor(); 136 void ResetCompositor();
137 // Note: |src_subrect| is specified in DIP dimensions while |output_size| 137 // Note: |src_subrect| is specified in DIP dimensions while |output_size|
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 bool skipped_frames_; 281 bool skipped_frames_;
282 std::vector<ui::LatencyInfo> skipped_latency_info_list_; 282 std::vector<ui::LatencyInfo> skipped_latency_info_list_;
283 283
284 std::unique_ptr<ui::Layer> right_gutter_; 284 std::unique_ptr<ui::Layer> right_gutter_;
285 std::unique_ptr<ui::Layer> bottom_gutter_; 285 std::unique_ptr<ui::Layer> bottom_gutter_;
286 286
287 // This is the last root background color from a swapped frame. 287 // This is the last root background color from a swapped frame.
288 SkColor background_color_; 288 SkColor background_color_;
289 289
290 // State for rendering into a Surface. 290 // State for rendering into a Surface.
291 std::unique_ptr<cc::LocalSurfaceIdAllocator> id_allocator_;
292 std::unique_ptr<cc::CompositorFrameSinkSupport> support_; 291 std::unique_ptr<cc::CompositorFrameSinkSupport> support_;
293 gfx::Size current_surface_size_; 292 gfx::Size current_surface_size_;
294 float current_scale_factor_; 293 float current_scale_factor_;
295 cc::ReturnedResourceArray surface_returned_resources_; 294 cc::ReturnedResourceArray surface_returned_resources_;
296 295
297 // This lock is the one waiting for a frame of the right size to come back 296 // This lock is the one waiting for a frame of the right size to come back
298 // from the renderer/GPU process. It is set from the moment the aura window 297 // from the renderer/GPU process. It is set from the moment the aura window
299 // got resized, to the moment we committed the renderer frame of the same 298 // got resized, to the moment we committed the renderer frame of the same
300 // size. It keeps track of the size we expect from the renderer, and locks the 299 // size. It keeps track of the size we expect from the renderer, and locks the
301 // compositor, as well as the UI for a short time to give a chance to the 300 // compositor, as well as the UI for a short time to give a chance to the
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 cc::BeginFrameArgs::kInvalidFrameNumber; 340 cc::BeginFrameArgs::kInvalidFrameNumber;
342 341
343 bool has_frame_ = false; 342 bool has_frame_ = false;
344 343
345 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_; 344 std::unique_ptr<DelegatedFrameEvictor> delegated_frame_evictor_;
346 }; 345 };
347 346
348 } // namespace content 347 } // namespace content
349 348
350 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_ 349 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/browser_compositor_view_mac.mm ('k') | content/browser/renderer_host/delegated_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698