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

Unified Diff: src/pdf/SkPDFFont.h

Issue 2112943002: SkPDF: Glyph Useage Map improvements (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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/pdf/SkPDFDocument.cpp ('k') | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFFont.h
diff --git a/src/pdf/SkPDFFont.h b/src/pdf/SkPDFFont.h
index 79a05a8c3733c420e66ec41dcd79b82e7fdda3ad..0d7374598469bb7b70327912886640dde78914de 100644
--- a/src/pdf/SkPDFFont.h
+++ b/src/pdf/SkPDFFont.h
@@ -21,10 +21,10 @@ class SkPDFFont;
class SkPDFGlyphSet : SkNoncopyable {
public:
SkPDFGlyphSet();
+ SkPDFGlyphSet(SkPDFGlyphSet&& o) : fBitSet(std::move(o.fBitSet)) {}
void set(const uint16_t* glyphIDs, int numGlyphs);
bool has(uint16_t glyphID) const;
- void merge(const SkPDFGlyphSet& usage);
void exportTo(SkTDArray<uint32_t>* glyphIDs) const;
private:
@@ -33,11 +33,15 @@ private:
class SkPDFGlyphSetMap : SkNoncopyable {
public:
- struct FontGlyphSetPair {
- FontGlyphSetPair(SkPDFFont* font, SkPDFGlyphSet* glyphSet);
-
+ struct FontGlyphSetPair : SkNoncopyable {
+ FontGlyphSetPair() : fFont(nullptr) {}
+ FontGlyphSetPair(FontGlyphSetPair&& o)
+ : fFont(o.fFont)
+ , fGlyphSet(std::move(o.fGlyphSet)) {
+ o.fFont = nullptr;
+ }
SkPDFFont* fFont;
- SkPDFGlyphSet* fGlyphSet;
+ SkPDFGlyphSet fGlyphSet;
};
SkPDFGlyphSetMap();
@@ -46,16 +50,13 @@ public:
const FontGlyphSetPair* begin() const { return fMap.begin(); }
const FontGlyphSetPair* end() const { return fMap.end(); }
- void merge(const SkPDFGlyphSetMap& usage);
- void reset();
-
void noteGlyphUsage(SkPDFFont* font, const uint16_t* glyphIDs,
int numGlyphs);
private:
SkPDFGlyphSet* getGlyphSetForFont(SkPDFFont* font);
- SkTDArray<FontGlyphSetPair> fMap;
+ SkTArray<FontGlyphSetPair> fMap;
};
« no previous file with comments | « src/pdf/SkPDFDocument.cpp ('k') | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698