Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
SkStrikeServer Class Reference

#include <SkChromeRemoteGlyphCache.h>

Classes

class  DiscardableHandleManager
 

Public Member Functions

SK_SPI SkStrikeServer (DiscardableHandleManager *discardableHandleManager)
 
SK_SPI ~SkStrikeServer ()
 
SK_API std::unique_ptr< SkCanvasmakeAnalysisCanvas (int width, int height, const SkSurfaceProps &props, sk_sp< SkColorSpace > colorSpace, bool DFTSupport, bool DFTPerspSupport=true)
 
SK_SPI void writeStrikeData (std::vector< uint8_t > *memory)
 
void setMaxEntriesInDescriptorMapForTesting (size_t count)
 
size_t remoteStrikeMapSizeForTesting () const
 

Detailed Description

Definition at line 31 of file SkChromeRemoteGlyphCache.h.

Constructor & Destructor Documentation

◆ SkStrikeServer()

SkStrikeServer::SkStrikeServer ( DiscardableHandleManager discardableHandleManager)
explicit

Definition at line 515 of file SkChromeRemoteGlyphCache.cpp.

◆ ~SkStrikeServer()

SkStrikeServer::~SkStrikeServer ( )
default

Member Function Documentation

◆ makeAnalysisCanvas()

std::unique_ptr< SkCanvas > SkStrikeServer::makeAnalysisCanvas ( int  width,
int  height,
const SkSurfaceProps props,
sk_sp< SkColorSpace colorSpace,
bool  DFTSupport,
bool  DFTPerspSupport = true 
)

Definition at line 520 of file SkChromeRemoteGlyphCache.cpp.

524 {
525#if !defined(SK_DISABLE_SDF_TEXT)
526 // These are copied from the defaults in GrContextOptions for historical reasons.
527 // TODO(herb, jvanverth) pipe in parameters that can be used for both Ganesh and Graphite
528 // backends instead of just using the defaults.
529 constexpr float kMinDistanceFieldFontSize = 18.f;
530
531#if defined(SK_BUILD_FOR_ANDROID)
532 constexpr float kGlyphsAsPathsFontSize = 384.f;
533#elif defined(SK_BUILD_FOR_MAC)
534 constexpr float kGlyphsAsPathsFontSize = 256.f;
535#else
536 constexpr float kGlyphsAsPathsFontSize = 324.f;
537#endif
538 auto control = sktext::gpu::SDFTControl{DFTSupport,
540 DFTPerspSupport,
541 kMinDistanceFieldFontSize,
542 kGlyphsAsPathsFontSize};
543#else
544 auto control = sktext::gpu::SDFTControl{};
545#endif
546
547 sk_sp<SkDevice> trackingDevice = sk_make_sp<GlyphTrackingDevice>(
549 props, this->impl(),
550 std::move(colorSpace),
551 control);
552 return std::make_unique<SkCanvas>(std::move(trackingDevice));
553}
bool isUseDeviceIndependentFonts() const
int32_t height
int32_t width
static constexpr SkISize Make(int32_t w, int32_t h)
Definition SkSize.h:20

◆ remoteStrikeMapSizeForTesting()

size_t SkStrikeServer::remoteStrikeMapSizeForTesting ( ) const

Definition at line 564 of file SkChromeRemoteGlyphCache.cpp.

564 {
565 return fImpl->remoteStrikeMapSizeForTesting();
566}

◆ setMaxEntriesInDescriptorMapForTesting()

void SkStrikeServer::setMaxEntriesInDescriptorMapForTesting ( size_t  count)

Definition at line 561 of file SkChromeRemoteGlyphCache.cpp.

561 {
562 fImpl->setMaxEntriesInDescriptorMapForTesting(count);
563}
int count

◆ writeStrikeData()

void SkStrikeServer::writeStrikeData ( std::vector< uint8_t > *  memory)

Definition at line 555 of file SkChromeRemoteGlyphCache.cpp.

555 {
556 fImpl->writeStrikeData(memory);
557}

The documentation for this class was generated from the following files: