document_transition_content_layer_impl.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef CC_LAYERS_DOCUMENT_TRANSITION_CONTENT_LAYER_IMPL_H_
  5. #define CC_LAYERS_DOCUMENT_TRANSITION_CONTENT_LAYER_IMPL_H_
  6. #include <memory>
  7. #include "cc/cc_export.h"
  8. #include "cc/layers/layer_impl.h"
  9. #include "components/viz/common/shared_element_resource_id.h"
  10. namespace cc {
  11. class CC_EXPORT DocumentTransitionContentLayerImpl : public LayerImpl {
  12. public:
  13. static std::unique_ptr<DocumentTransitionContentLayerImpl> Create(
  14. LayerTreeImpl* tree_impl,
  15. int id,
  16. const viz::SharedElementResourceId& resource_id,
  17. bool is_live_content_layer);
  18. DocumentTransitionContentLayerImpl(
  19. const DocumentTransitionContentLayerImpl&) = delete;
  20. ~DocumentTransitionContentLayerImpl() override;
  21. DocumentTransitionContentLayerImpl& operator=(
  22. const DocumentTransitionContentLayerImpl&) = delete;
  23. // LayerImpl overrides.
  24. std::unique_ptr<LayerImpl> CreateLayerImpl(
  25. LayerTreeImpl* tree_impl) const override;
  26. void AppendQuads(viz::CompositorRenderPass* render_pass,
  27. AppendQuadsData* append_quads_data) override;
  28. void NotifyKnownResourceIdsBeforeAppendQuads(
  29. const base::flat_set<viz::SharedElementResourceId>& known_resource_ids)
  30. override;
  31. protected:
  32. DocumentTransitionContentLayerImpl(
  33. LayerTreeImpl* tree_impl,
  34. int id,
  35. const viz::SharedElementResourceId& resource_id,
  36. bool is_live_content_layer);
  37. private:
  38. const char* LayerTypeAsString() const override;
  39. const viz::SharedElementResourceId resource_id_;
  40. const bool is_live_content_layer_;
  41. bool skip_unseen_resource_quads_ = false;
  42. };
  43. } // namespace cc
  44. #endif // CC_LAYERS_DOCUMENT_TRANSITION_CONTENT_LAYER_IMPL_H_