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

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

Issue 2790623003: ui: Rework CompositorResizeLock interaction with DelegatedFrameHost (Closed)
Patch Set: shouldskip: allowskipafterframe Created 3 years, 8 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..faa46b71db8c7a848b3176473757046ba0960cce 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,12 +204,11 @@ 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);
- bool ShouldSkipFrame(gfx::Size size_in_dip) const;
+ bool ShouldSkipFrame(const gfx::Size& size_in_dip);
// Lazily grab a resize lock if the aura window size doesn't match the current
// frame size, to give time to the renderer.
@@ -294,6 +292,8 @@ 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;
+ bool allow_one_renderer_frame_during_resize_lock_ = false;
// Keeps track of the current frame size.
gfx::Size current_frame_size_in_dip_;
@@ -301,17 +301,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