Flutter Engine
The Flutter Engine
mock_embedder.cc
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#include "flutter/flow/testing/mock_embedder.h"
6
7namespace flutter {
8namespace testing {
9
11
13
15 contexts_.emplace_back(canvas);
16}
17
18// |ExternalViewEmbedder|
20 return nullptr;
21}
22
23// |ExternalViewEmbedder|
25
26// |ExternalViewEmbedder|
28 GrDirectContext* context,
29 const fml::RefPtr<fml::RasterThreadMerger>& raster_thread_merger) {}
30
31// |ExternalViewEmbedder|
33 double device_pixel_ratio) {}
34
35// |ExternalViewEmbedder|
37 int64_t view_id,
38 std::unique_ptr<EmbeddedViewParams> params) {
39 prerolled_views_.emplace_back(view_id);
40}
41
42// |ExternalViewEmbedder|
44 painted_views_.emplace_back(view_id);
45 DlCanvas* canvas = contexts_.front();
46 contexts_.pop_front();
47 return canvas;
48}
49
50} // namespace testing
51} // namespace flutter
Developer-facing API for rendering anything within the engine.
Definition: dl_canvas.h:38
void PrepareFlutterView(SkISize frame_size, double device_pixel_ratio) override
void BeginFrame(GrDirectContext *context, const fml::RefPtr< fml::RasterThreadMerger > &raster_thread_merger) override
void PrerollCompositeEmbeddedView(int64_t view_id, std::unique_ptr< EmbeddedViewParams > params) override
void AddCanvas(DlCanvas *canvas)
DlCanvas * CompositeEmbeddedView(int64_t view_id) override
DlCanvas * GetRootCanvas() override
const EmbeddedViewParams * params
Definition: SkSize.h:16