Flutter Engine
The Flutter Engine
texture_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_TEXTURE_LAYER_H_
6#define FLUTTER_FLOW_LAYERS_TEXTURE_LAYER_H_
7
8#include "flutter/flow/layers/layer.h"
11
12namespace flutter {
13
14class TextureLayer : public Layer {
15 public:
17 const SkSize& size,
18 int64_t texture_id,
19 bool freeze,
21
22 bool IsReplacing(DiffContext* context, const Layer* layer) const override {
23 return layer->as_texture_layer() != nullptr;
24 }
25
26 void Diff(DiffContext* context, const Layer* old_layer) override;
27
28 const TextureLayer* as_texture_layer() const override { return this; }
29
30 void Preroll(PrerollContext* context) override;
31 void Paint(PaintContext& context) const override;
32
33 private:
34 SkPoint offset_;
35 SkSize size_;
36 int64_t texture_id_;
37 bool freeze_;
38 DlImageSampling sampling_;
39
40 FML_DISALLOW_COPY_AND_ASSIGN(TextureLayer);
41};
42
43} // namespace flutter
44
45#endif // FLUTTER_FLOW_LAYERS_TEXTURE_LAYER_H_
virtual const TextureLayer * as_texture_layer() const
Definition: layer.h:262
void Paint(PaintContext &context) const override
TextureLayer(const SkPoint &offset, const SkSize &size, int64_t texture_id, bool freeze, DlImageSampling sampling)
bool IsReplacing(DiffContext *context, const Layer *layer) const override
Definition: texture_layer.h:22
const TextureLayer * as_texture_layer() const override
Definition: texture_layer.h:28
void Preroll(PrerollContext *context) override
void Diff(DiffContext *context, const Layer *old_layer) override
SkSamplingOptions sampling
Definition: SkRecords.h:337
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
SeparatedVector2 offset
Definition: SkSize.h:52
int64_t texture_id