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

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

Issue 2790623003: ui: Rework CompositorResizeLock interaction with DelegatedFrameHost (Closed)
Patch Set: shouldskip: . 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 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 2a3433b17ff2eed21a8bbd45e2576c39ad8e2e85..7e734295944cec3cc54c6ee15a75af8c7312401e 100644
--- a/content/browser/renderer_host/delegated_frame_host.h
+++ b/content/browser/renderer_host/delegated_frame_host.h
@@ -69,7 +69,6 @@ class CONTENT_EXPORT DelegatedFrameHostClient {
virtual bool DelegatedFrameCanCreateResizeLock() const = 0;
virtual std::unique_ptr<CompositorResizeLock>
DelegatedFrameHostCreateResizeLock() = 0;
- virtual void DelegatedFrameHostResizeLockWasReleased() = 0;
virtual void DelegatedFrameHostSendReclaimCompositorResources(
bool is_swap_ack,
@@ -205,7 +204,6 @@ class CONTENT_EXPORT DelegatedFrameHost
RenderWidgetHostViewFrameSubscriber* frame_subscriber() const {
return frame_subscriber_.get();
}
- bool ShouldCreateResizeLock();
void LockResources();
void UnlockResources();
void RequestCopyOfOutput(std::unique_ptr<cc::CopyOutputRequest> request);
@@ -294,6 +292,7 @@ class CONTENT_EXPORT DelegatedFrameHost
// compositor, as well as the UI for a short time to give a chance to the
// renderer of producing a frame of the right size.
std::unique_ptr<CompositorResizeLock> resize_lock_;
+ bool create_resize_lock_after_commit_ = false;
// Keeps track of the current frame size.
gfx::Size current_frame_size_in_dip_;
@@ -301,17 +300,6 @@ class CONTENT_EXPORT DelegatedFrameHost
// This lock is for waiting for a front surface to become available to draw.
std::unique_ptr<ui::CompositorLock> released_front_lock_;
- enum CanLockCompositorState {
- YES_CAN_LOCK,
- // We locked, so at some point we'll need to kick a frame.
- YES_DID_LOCK,
- // No. A lock timed out, we need to kick a new frame before locking again.
- NO_PENDING_RENDERER_FRAME,
- // No. We've got a frame, but it hasn't been committed.
- NO_PENDING_COMMIT,
- };
- CanLockCompositorState can_lock_compositor_;
-
base::TimeTicks last_draw_ended_;
// Subscriber that listens to frame presentation events.

Powered by Google App Engine
This is Rietveld 408576698