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

Unified Diff: content/browser/renderer_host/delegated_frame_host.h

Issue 2388753003: Introduce cc::LocalFrameId and use in SurfaceFactory (Closed)
Patch Set: Fix exo_unittests Created 4 years, 2 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
Index: content/browser/renderer_host/delegated_frame_host.h
diff --git a/content/browser/renderer_host/delegated_frame_host.h b/content/browser/renderer_host/delegated_frame_host.h
index 244efca1e1ea89b567e155eb680538629405b6fe..e60855b6e20831b98d10ddcbb745911493a0f5b1 100644
--- a/content/browser/renderer_host/delegated_frame_host.h
+++ b/content/browser/renderer_host/delegated_frame_host.h
@@ -119,7 +119,7 @@ class CONTENT_EXPORT DelegatedFrameHost
// cc::SurfaceFactoryClient implementation.
void ReturnResources(const cc::ReturnedResourceArray& resources) override;
- void WillDrawSurface(const cc::SurfaceId& id,
+ void WillDrawSurface(const cc::LocalFrameId& id,
const gfx::Rect& damage_rect) override;
void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override;
@@ -176,7 +176,14 @@ class CONTENT_EXPORT DelegatedFrameHost
RenderWidgetHostViewBase* target_view);
// Exposed for tests.
- cc::SurfaceId SurfaceIdForTesting() const { return surface_id_; }
+ cc::SurfaceId SurfaceIdForTesting() const {
+ return cc::SurfaceId(frame_sink_id_, local_frame_id_);
+ }
+
+ const cc::LocalFrameId& LocalFrameIdForTesting() const {
+ return local_frame_id_;
+ }
+
void OnCompositingDidCommitForTesting(ui::Compositor* compositor) {
OnCompositingDidCommit(compositor);
}
@@ -249,6 +256,7 @@ class CONTENT_EXPORT DelegatedFrameHost
void AttemptFrameSubscriberCapture(const gfx::Rect& damage_rect);
const cc::FrameSinkId frame_sink_id_;
+ cc::LocalFrameId local_frame_id_;
DelegatedFrameHostClient* const client_;
ui::Compositor* compositor_;
@@ -286,7 +294,6 @@ class CONTENT_EXPORT DelegatedFrameHost
// State for rendering into a Surface.
std::unique_ptr<cc::SurfaceIdAllocator> id_allocator_;
std::unique_ptr<cc::SurfaceFactory> surface_factory_;
- cc::SurfaceId surface_id_;
gfx::Size current_surface_size_;
float current_scale_factor_;
cc::ReturnedResourceArray surface_returned_resources_;

Powered by Google App Engine
This is Rietveld 408576698