/* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef sktext_gpu_TextBlob_DEFINED #define sktext_gpu_TextBlob_DEFINED #include "include/core/SkColor.h" #include "include/core/SkMatrix.h" #include "include/core/SkPaint.h" #include "include/core/SkRefCnt.h" #include "include/core/SkScalar.h" #include "include/core/SkSurfaceProps.h" #include "include/private/base/SkTo.h" #include "src/base/SkTInternalLList.h" #include "src/core/SkMaskFilterBase.h" #include "src/text/gpu/SubRunAllocator.h" #include "src/text/gpu/SubRunContainer.h" #include <cstddef> #include <cstdint> #include <tuple> class SkCanvas; struct SkPoint; struct SkStrikeDeviceInfo; namespace sktext { class GlyphRunList; class StrikeForGPUCacheInterface; } namespace sktext::gpu { class Slug; // -- TextBlob ----------------------------------------------------------------------------------- // A TextBlob contains a fully processed SkTextBlob, suitable for nearly immediate drawing // on the GPU. These are initially created with valid positions and colors, but with invalid // texture coordinates. // // A TextBlob contains a number of SubRuns that are created in the blob's arena. Each SubRun // tracks its own glyph and position data. // // In these classes, I'm trying to follow the convention about matrices and origins. // * drawMatrix and drawOrigin - describes transformations for the current draw command. // * positionMatrix - is equal to drawMatrix * [drawOrigin-as-translation-matrix] // * initial Matrix - describes the combined initial matrix and origin the TextBlob was created // with. // // class TextBlob final : public SkRefCnt { … }; sk_sp<sktext::gpu::Slug> MakeSlug(const SkMatrix& drawMatrix, const sktext::GlyphRunList& glyphRunList, const SkPaint& paint, SkStrikeDeviceInfo strikeDeviceInfo, sktext::StrikeForGPUCacheInterface* strikeCache); } // namespace sktext::gpu #endif // sktext_gpu_TextBlob_DEFINED