Flutter Impeller
texture_descriptor.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/core/texture_descriptor.h
"
6
7
#include <sstream>
8
9
namespace
impeller
{
10
11
std::string
TextureDescriptorToString
(
const
TextureDescriptor
& desc) {
12
std::stringstream stream;
13
stream <<
"StorageMode="
<<
StorageModeToString
(desc.
storage_mode
) <<
","
;
14
stream <<
"Type="
<<
TextureTypeToString
(desc.
type
) <<
","
;
15
stream <<
"Format="
<<
PixelFormatToString
(desc.
format
) <<
","
;
16
stream <<
"Size="
<< desc.
size
<<
","
;
17
stream <<
"MipCount="
<< desc.
mip_count
<<
","
;
18
stream <<
"SampleCount="
<<
static_cast<
size_t
>
(desc.
sample_count
) <<
","
;
19
stream <<
"Compression="
<<
CompressionTypeToString
(desc.
compression_type
);
20
return
stream.str();
21
}
22
23
}
// namespace impeller
impeller
Definition:
allocation.cc:12
impeller::TextureDescriptorToString
std::string TextureDescriptorToString(const TextureDescriptor &desc)
Definition:
texture_descriptor.cc:11
impeller::TextureTypeToString
constexpr const char * TextureTypeToString(TextureType type)
Definition:
formats.h:269
impeller::PixelFormatToString
constexpr const char * PixelFormatToString(PixelFormat format)
Definition:
formats.h:140
impeller::StorageModeToString
constexpr const char * StorageModeToString(StorageMode mode)
Definition:
formats.h:60
impeller::CompressionTypeToString
constexpr const char * CompressionTypeToString(CompressionType type)
Definition:
texture_descriptor.h:24
impeller::TextureDescriptor
A lightweight object that describes the attributes of a texture that can then used an allocator to cr...
Definition:
texture_descriptor.h:38
impeller::TextureDescriptor::compression_type
CompressionType compression_type
Definition:
texture_descriptor.h:46
impeller::TextureDescriptor::type
TextureType type
Definition:
texture_descriptor.h:40
impeller::TextureDescriptor::size
ISize size
Definition:
texture_descriptor.h:42
impeller::TextureDescriptor::storage_mode
StorageMode storage_mode
Definition:
texture_descriptor.h:39
impeller::TextureDescriptor::sample_count
SampleCount sample_count
Definition:
texture_descriptor.h:45
impeller::TextureDescriptor::mip_count
size_t mip_count
Definition:
texture_descriptor.h:43
impeller::TextureDescriptor::format
PixelFormat format
Definition:
texture_descriptor.h:41
texture_descriptor.h
impeller
core
texture_descriptor.cc
Generated by
1.9.1