Commit d2636694 authored by Sadrul Habib Chowdhury's avatar Sadrul Habib Chowdhury Committed by Commit Bot

cc: Some API cleanup.

LayerTreeFrameSinkClient::DidNotNeedBeginFrame() is never used
from LayerTreeFrameSink instances. So it is removed. However,
LayerTreeHostImpl::DidNotNeedBeginFrame() is still used to notify
when the compositor stops asking for begin-frames, so keep it as
a direct member function.

BUG=none
TBR=oshima@ for mechanical changes in ash/ and components/exo

Change-Id: Ia5b7dac845e12a487e25f635cdc6ee9d8de2bd26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1692485
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Reviewed-by: default avatarkylechar <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#675741}
parent 2f1db462
......@@ -240,7 +240,6 @@ class FastInkView::LayerTreeFrameSinkHolder
if (root_window_)
ScheduleDelete();
}
void DidNotNeedBeginFrame() override {}
void OnDraw(const gfx::Transform& transform,
const gfx::Rect& viewport,
bool resourceless_software_draw,
......
......@@ -24,7 +24,6 @@ class FakeLayerTreeFrameSinkClient : public LayerTreeFrameSinkClient {
void ReclaimResources(
const std::vector<viz::ReturnedResource>& resources) override {}
void DidLoseLayerTreeFrameSink() override;
void DidNotNeedBeginFrame() override {}
void SetExternalTilePriorityConstraints(
const gfx::Rect& viewport_rect_for_tile_priority,
const gfx::Transform& transform_for_tile_priority) override {}
......
......@@ -68,9 +68,6 @@ class CC_EXPORT LayerTreeFrameSinkClient {
// viz::ContextProviders) must be recreated.
virtual void DidLoseLayerTreeFrameSink() = 0;
// Notification that the client does not need a new BeginFrame.
virtual void DidNotNeedBeginFrame() = 0;
// For SynchronousCompositor (WebView) to ask the layer compositor to submit
// a new CompositorFrame synchronously.
virtual void OnDraw(const gfx::Transform& transform,
......
......@@ -3324,13 +3324,14 @@ void LayerTreeHostImpl::ReleaseLayerTreeFrameSink() {
// If gpu compositing, then any resources created with the gpu context in the
// LayerTreeFrameSink were exported to the display compositor may be modified
// by it, and thus we would be unable to determine what state they are in, in
// order to reuse them, so they must be lost. Note that this includes resources
// created using the gpu context associated with |layer_tree_frame_sink_|
// internally by the compositor and any resources received from an external
// source (for instance, TextureLayers). This is because the API contract
// for releasing these external resources requires that the compositor return
// them with a valid sync token and no modifications to their GL state. Since
// that can not be guaranteed, these must also be marked lost.
// order to reuse them, so they must be lost. Note that this includes
// resources created using the gpu context associated with
// |layer_tree_frame_sink_| internally by the compositor and any resources
// received from an external source (for instance, TextureLayers). This is
// because the API contract for releasing these external resources requires
// that the compositor return them with a valid sync token and no
// modifications to their GL state. Since that can not be guaranteed, these
// must also be marked lost.
//
// In software compositing, the resources are not modified by the display
// compositor (there is no stateful metadata for shared memory), so we do not
......@@ -3338,9 +3339,9 @@ void LayerTreeHostImpl::ReleaseLayerTreeFrameSink() {
//
// In both cases, the resources that are exported to the display compositor
// will have no means of being returned to this client without the
// LayerTreeFrameSink, so they should no longer be considered as exported.
// Do this *after* any interactions with the |layer_tree_frame_sink_| in case
// it tries to return resources during destruction.
// LayerTreeFrameSink, so they should no longer be considered as exported. Do
// this *after* any interactions with the |layer_tree_frame_sink_| in case it
// tries to return resources during destruction.
//
// The assumption being made here is that the display compositor WILL NOT use
// any resources previously exported when the CompositorFrameSink is closed.
......
......@@ -439,6 +439,8 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandler,
DrawMode GetDrawMode() const;
void DidNotNeedBeginFrame();
// TileManagerClient implementation.
void NotifyReadyToActivate() override;
void NotifyReadyToDraw() override;
......@@ -478,7 +480,6 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandler,
void DidPresentCompositorFrame(
uint32_t frame_token,
const gfx::PresentationFeedback& feedback) override;
void DidNotNeedBeginFrame() override;
void ReclaimResources(
const std::vector<viz::ReturnedResource>& resources) override;
void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
......
......@@ -57,7 +57,6 @@ class LayerTreeFrameSinkHolder : public cc::LayerTreeFrameSinkClient,
uint32_t presentation_token,
const gfx::PresentationFeedback& feedback) override;
void DidLoseLayerTreeFrameSink() override;
void DidNotNeedBeginFrame() override {}
void OnDraw(const gfx::Transform& transform,
const gfx::Rect& viewport,
bool resourceless_software_draw,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment