Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1084)

Unified Diff: src/core/SkScalerContext.cpp

Issue 1834303003: Delete SkFlattenable::Type (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkReadBuffer.cpp ('k') | src/core/SkValidatingReadBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScalerContext.cpp
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index cf4098bbdda9ccc07358d55415b6693f883e4aa8..3db9e308760da15acf06c219fe7fa3ab032ee2b5 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -62,15 +62,14 @@ void SkGlyph::zeroMetrics() {
#define DUMP_RECx
#endif
-static SkFlattenable* load_flattenable(const SkDescriptor* desc, uint32_t tag,
- SkFlattenable::Type ft) {
+static SkFlattenable* load_flattenable(const SkDescriptor* desc, uint32_t tag) {
SkFlattenable* obj = nullptr;
uint32_t len;
const void* data = desc->findEntry(tag, &len);
if (data) {
SkReadBuffer buffer(data, len);
- obj = buffer.readFlattenable(ft);
+ obj = buffer.readFlattenable();
SkASSERT(buffer.offset() == buffer.size());
}
return obj;
@@ -80,12 +79,9 @@ SkScalerContext::SkScalerContext(SkTypeface* typeface, const SkDescriptor* desc)
: fRec(*static_cast<const Rec*>(desc->findEntry(kRec_SkDescriptorTag, nullptr)))
, fTypeface(SkRef(typeface))
- , fPathEffect(static_cast<SkPathEffect*>(load_flattenable(desc, kPathEffect_SkDescriptorTag,
- SkFlattenable::kSkPathEffect_Type)))
- , fMaskFilter(static_cast<SkMaskFilter*>(load_flattenable(desc, kMaskFilter_SkDescriptorTag,
- SkFlattenable::kSkMaskFilter_Type)))
- , fRasterizer(static_cast<SkRasterizer*>(load_flattenable(desc, kRasterizer_SkDescriptorTag,
- SkFlattenable::kSkRasterizer_Type)))
+ , fPathEffect(static_cast<SkPathEffect*>(load_flattenable(desc, kPathEffect_SkDescriptorTag)))
+ , fMaskFilter(static_cast<SkMaskFilter*>(load_flattenable(desc, kMaskFilter_SkDescriptorTag)))
+ , fRasterizer(static_cast<SkRasterizer*>(load_flattenable(desc, kRasterizer_SkDescriptorTag)))
// Initialize based on our settings. Subclasses can also force this.
, fGenerateImageFromPath(fRec.fFrameWidth > 0 || fPathEffect != nullptr || fRasterizer != nullptr)
« no previous file with comments | « src/core/SkReadBuffer.cpp ('k') | src/core/SkValidatingReadBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698