#ifndef CC_TREES_LAYER_CONTEXT_H_
#define CC_TREES_LAYER_CONTEXT_H_
#include "base/time/time.h"
#include "cc/cc_export.h"
#include "cc/trees/commit_state.h"
#include "components/viz/common/surfaces/local_surface_id.h"
namespace gfx {
class Rect;
}
namespace gpu {
class SharedImageInterface;
}
namespace viz {
class ClientResourceProvider;
class LocalSurfaceId;
}
namespace cc {
class PictureLayerImpl;
class Tile;
class CC_EXPORT LayerContext {
public:
virtual ~LayerContext() = default;
virtual void SetVisible(bool visible) = 0;
virtual base::TimeTicks UpdateDisplayTreeFrom(
LayerTreeImpl& tree,
viz::ClientResourceProvider& resource_provider,
gpu::SharedImageInterface* shared_image_interface,
const gfx::Rect& viewport_damage_rect,
const viz::LocalSurfaceId& target_local_surface_id,
bool frame_has_damage) = 0;
virtual void UpdateDisplayTile(
PictureLayerImpl& layer,
const Tile& tile,
viz::ClientResourceProvider& resource_provider,
gpu::SharedImageInterface* shared_image_interface,
bool update_damage) = 0;
};
}
#endif