Flutter Engine
The 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
10#include "flutter/display_list/display_list.h"
11#include "flutter/flow/layers/display_list_raster_cache_item.h"
12#include "flutter/flow/layers/layer.h"
13#include "flutter/flow/raster_cache_item.h"
14
15namespace flutter {
16
17class DisplayListLayer : public Layer {
18 public:
19 static constexpr size_t kMaxBytesToCompare = 10000;
20
23 bool is_complex,
24 bool will_change);
25
26 DisplayList* display_list() const { return display_list_.get(); }
27
28 bool IsReplacing(DiffContext* context, const Layer* layer) const override;
29
30 void Diff(DiffContext* context, const Layer* old_layer) override;
31
32 const DisplayListLayer* as_display_list_layer() const override {
33 return this;
34 }
35
36 void Preroll(PrerollContext* frame) override;
37
38 void Paint(PaintContext& context) const override;
39
41 return display_list_raster_cache_item_.get();
42 }
43
48
49 private:
50 std::unique_ptr<DisplayListRasterCacheItem> display_list_raster_cache_item_;
51
52 SkPoint offset_;
53 SkRect bounds_;
54
55 sk_sp<DisplayList> display_list_;
56
57 static bool Compare(DiffContext::Statistics& statistics,
58 const DisplayListLayer* l1,
59 const DisplayListLayer* l2);
60
62};
63
64} // namespace flutter
65
66#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:250
double frame
Definition examples.cpp:31
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27
Point offset