Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
embedder_render_target_skia.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/shell/platform/embedder/embedder_render_target_skia.h"
6
7#include "flutter/fml/logging.h"
8
9namespace flutter {
10
12 FlutterBackingStore backing_store,
13 sk_sp<SkSurface> render_surface,
14 fml::closure on_release)
15 : EmbedderRenderTarget(backing_store, std::move(on_release)),
16 render_surface_(std::move(render_surface)) {
17 FML_DCHECK(render_surface_);
18}
19
21
23 return render_surface_;
24}
25
30
31std::shared_ptr<impeller::AiksContext>
33 return nullptr;
34}
35
37 return SkISize::Make(render_surface_->width(), render_surface_->height());
38}
39
40} // namespace flutter
int width() const
Definition SkSurface.h:178
int height() const
Definition SkSurface.h:184
impeller::RenderTarget * GetImpellerRenderTarget() const override
An impeller render target the rasterizer can use to draw into the backing store.
std::shared_ptr< impeller::AiksContext > GetAiksContext() const override
Returns the AiksContext that should be used for rendering, if this render target is backed by Impelle...
EmbedderRenderTargetSkia(FlutterBackingStore backing_store, sk_sp< SkSurface > render_surface, fml::closure on_release)
sk_sp< SkSurface > GetSkiaSurface() const override
A render surface the rasterizer can use to draw into the backing store of this render target.
SkISize GetRenderTargetSize() const override
Returns the size of the render target.
Describes a surface whose backing store is managed by the embedder. The type of surface depends on th...
#define FML_DCHECK(condition)
Definition logging.h:103
std::function< void()> closure
Definition closure.h:14
Definition ref_ptr.h:256
static constexpr SkISize Make(int32_t w, int32_t h)
Definition SkSize.h:20