Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
impeller
renderer
surface.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 "
impeller/renderer/surface.h
"
6
7
#include "flutter/fml/logging.h"
8
9
namespace
impeller
{
10
11
Surface::Surface
() :
Surface
(
RenderTarget
{}) {}
12
13
Surface::Surface
(
const
RenderTarget
& target_desc) : desc_(target_desc) {
14
if
(
auto
size = desc_.
GetColorAttachmentSize
(0u); size.has_value()) {
15
size_ = size.value();
16
}
else
{
17
return
;
18
}
19
20
is_valid_ =
true
;
21
}
22
23
Surface::~Surface
() =
default
;
24
25
const
ISize
&
Surface::GetSize
()
const
{
26
return
size_;
27
}
28
29
bool
Surface::IsValid
()
const
{
30
return
is_valid_;
31
}
32
33
const
RenderTarget
&
Surface::GetTargetRenderPassDescriptor
()
const
{
34
return
desc_;
35
}
36
37
bool
Surface::Present
()
const
{
38
return
false
;
39
};
40
41
}
// namespace impeller
impeller::RenderTarget
Definition
render_target.h:38
impeller::RenderTarget::GetColorAttachmentSize
std::optional< ISize > GetColorAttachmentSize(size_t index) const
Definition
render_target.cc:129
impeller::Surface
Definition
surface.h:18
impeller::Surface::IsValid
bool IsValid() const
Definition
surface.cc:29
impeller::Surface::~Surface
virtual ~Surface()
impeller::Surface::Surface
Surface()
Definition
surface.cc:11
impeller::Surface::GetSize
const ISize & GetSize() const
Definition
surface.cc:25
impeller::Surface::Present
virtual bool Present() const
Definition
surface.cc:37
impeller::Surface::GetTargetRenderPassDescriptor
const RenderTarget & GetTargetRenderPassDescriptor() const
Definition
surface.cc:33
surface.h
impeller
Definition
texture.h:18
impeller::TSize< int64_t >
Generated on Fri Apr 26 2024 06:14:04 for Flutter Engine by
1.9.8