LAST_VIEWPORT_LAYER_TYPE = OUTER_VIEWPORT_SCROLL,
};
-#if BUILDFLAG(IS_EFL)
-enum LayerType {
- LAYER_TYPE_NORMAL = 1,
- LAYER_TYPE_TEXTURE = 1 << 1,
- LAYER_TYPE_VIDEO = 1 << 2
-};
-
-typedef unsigned LayerTypeMask;
-#endif
-
class CC_EXPORT LayerImpl {
public:
static std::unique_ptr<LayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
ElementListType GetElementTypeForAnimation() const;
-#if BUILDFLAG(IS_EFL) && !defined(EWK_BRINGUP) // FIXME: m130 bringup
- virtual LayerType GetLayerType() const { return LAYER_TYPE_NORMAL; }
-#endif
-
void set_raster_even_if_not_drawn(bool yes) {
raster_even_if_not_drawn_ = yes;
}
static bool MayEvictResourceInBackground(
viz::TransferableResource::ResourceSource source);
-#if BUILDFLAG(IS_EFL) && !defined(EWK_BRINGUP) // FIXME: m130 bringup
- LayerType GetLayerType() const override { return LAYER_TYPE_TEXTURE; }
-#endif
-
private:
TextureLayerImpl(LayerTreeImpl* tree_impl, int id);
return video_transform_;
}
-#if BUILDFLAG(IS_EFL) && !defined(EWK_BRINGUP) // FIXME: m130 bringup
- LayerType GetLayerType() const override { return LAYER_TYPE_VIDEO; }
-#endif
-
private:
VideoLayerImpl(
LayerTreeImpl* tree_impl,
#if BUILDFLAG(IS_EFL)
bool LayerTreeHostImpl::CanSkipFlush() const {
-#if !defined(EWK_BRINGUP) // FIXME: m130 bringup
- if (active_tree_->HasLayer(LAYER_TYPE_TEXTURE | LAYER_TYPE_VIDEO))
+ if (active_tree_->HasLayer(mojom::LayerType::kTexture)) {
return true;
-#endif
+ }
return false;
}
#endif
host_impl_->DidAnimateScrollOffset();
}
-#if BUILDFLAG(IS_EFL) && !defined(EWK_BRINGUP) // FIXME: m130 bringup
-bool LayerTreeImpl::HasLayer(LayerTypeMask layer_type_mask) const {
+#if BUILDFLAG(IS_EFL)
+bool LayerTreeImpl::HasLayer(mojom::LayerType type) const {
for (auto& layer : layer_list_) {
- if (layer_type_mask & layer->GetLayerType())
+ if (layer->GetLayerType() == type) {
return true;
+ }
}
return false;
}
CreateScrollbarAnimationController(ElementId scroll_element_id,
float initial_opacity);
#if BUILDFLAG(IS_EFL)
- bool HasLayer(LayerTypeMask) const;
+ bool HasLayer(mojom::LayerType type) const;
#endif
void DidAnimateScrollOffset();
bool use_gpu_rasterization() const;