Flutter Engine
 
Loading...
Searching...
No Matches
display_list_layer.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter 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
5#ifndef FLUTTER_FLOW_LAYERS_DISPLAY_LIST_LAYER_H_
6#define FLUTTER_FLOW_LAYERS_DISPLAY_LIST_LAYER_H_
7
8#include <memory>
9
15
16namespace flutter {
17
18class DisplayListLayer : public Layer {
19 public:
20 static constexpr size_t kMaxBytesToCompare = 10000;
21
22 DisplayListLayer(const DlPoint& offset,
23 sk_sp<DisplayList> display_list,
24 bool is_complex,
25 bool will_change);
26
27 DisplayList* display_list() const { return display_list_.get(); }
28
29 bool IsReplacing(DiffContext* context, const Layer* layer) const override;
30
31 void Diff(DiffContext* context, const Layer* old_layer) override;
32
33 const DisplayListLayer* as_display_list_layer() const override {
34 return this;
35 }
36
37 void Preroll(PrerollContext* frame) override;
38
39 void Paint(PaintContext& context) const override;
40
41#if !SLIMPELLER
43 return display_list_raster_cache_item_.get();
44 }
45
50#endif // !SLIMPELLER
51
52 private:
53 NOT_SLIMPELLER(std::unique_ptr<DisplayListRasterCacheItem>
54 display_list_raster_cache_item_);
55
56 DlPoint offset_;
57 DlRect bounds_;
58
59 sk_sp<DisplayList> display_list_;
60
61 static bool Compare(DiffContext::Statistics& statistics,
62 const DisplayListLayer* l1,
63 const DisplayListLayer* l2);
64
66};
67
68} // namespace flutter
69
70#endif // FLUTTER_FLOW_LAYERS_DISPLAY_LIST_LAYER_H_
bool IsReplacing(DiffContext *context, const Layer *layer) const override
void Preroll(PrerollContext *frame) override
void Diff(DiffContext *context, const Layer *old_layer) override
const DisplayListRasterCacheItem * raster_cache_item() const
DisplayList * display_list() const
const DisplayListLayer * as_display_list_layer() const override
static constexpr size_t kMaxBytesToCompare
RasterCacheKeyID caching_key_id() const override
uint64_t unique_id() const
Definition layer.h:237
#define NOT_SLIMPELLER(code)
Definition macros.h:16
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27