aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrFontScaler.h
diff options
context:
space:
mode:
authorGravatar djsollen <djsollen@google.com>2014-11-13 12:52:35 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-13 12:52:35 -0800
commit0b17d6cb343cb71a3f548a02f0952c3592fc8c87 (patch)
tree0a5577be50cfbd238db7008c7d73f7cc7b9e58a6 /include/gpu/GrFontScaler.h
parent04f7e14b385118b8caa3ad7fcb30d64f4c32e677 (diff)
Cleanup public includes directory.
This CL updates various files in the includes directory to ensure that (1) they do not depend on headers in /src and (2) that they minimize their dependence on external headers. To ensure that we don't regress this behavior a new build target has been added to build a single cpp file that contains all* public includes and is compiled with only those directories in the include path. * The exception is those includes that depend on OS specific headers BUG=skia:2941 NOTRY=true Review URL: https://codereview.chromium.org/721903002
Diffstat (limited to 'include/gpu/GrFontScaler.h')
-rw-r--r--include/gpu/GrFontScaler.h86
1 files changed, 0 insertions, 86 deletions
diff --git a/include/gpu/GrFontScaler.h b/include/gpu/GrFontScaler.h
deleted file mode 100644
index 54d1e3f9cc..0000000000
--- a/include/gpu/GrFontScaler.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright 2010 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef GrFontScaler_DEFINED
-#define GrFontScaler_DEFINED
-
-#include "GrGlyph.h"
-#include "GrTypes.h"
-
-#include "SkDescriptor.h"
-
-class SkPath;
-
-/*
- * Wrapper class to turn a font cache descriptor into a key
- * for GrFontScaler-related lookups
- */
-class GrFontDescKey : public SkRefCnt {
-public:
- SK_DECLARE_INST_COUNT(GrFontDescKey)
-
- typedef uint32_t Hash;
-
- explicit GrFontDescKey(const SkDescriptor& desc);
- virtual ~GrFontDescKey();
-
- Hash getHash() const { return fHash; }
-
- bool operator<(const GrFontDescKey& rh) const {
- return fHash < rh.fHash || (fHash == rh.fHash && this->lt(rh));
- }
- bool operator==(const GrFontDescKey& rh) const {
- return fHash == rh.fHash && this->eq(rh);
- }
-
-private:
- // helper functions for comparisons
- bool lt(const GrFontDescKey& rh) const;
- bool eq(const GrFontDescKey& rh) const;
-
- SkDescriptor* fDesc;
- enum {
- kMaxStorageInts = 16
- };
- uint32_t fStorage[kMaxStorageInts];
- const Hash fHash;
-
- typedef SkRefCnt INHERITED;
-};
-
-/*
- * This is Gr's interface to the host platform's font scaler.
- *
- * The client is responsible for instantiating this. The instance is created
- * for a specific font+size+matrix.
- */
-class GrFontScaler : public SkRefCnt {
-public:
- SK_DECLARE_INST_COUNT(GrFontScaler)
-
- explicit GrFontScaler(SkGlyphCache* strike);
- virtual ~GrFontScaler();
-
- const GrFontDescKey* getKey();
- GrMaskFormat getMaskFormat() const;
- GrMaskFormat getPackedGlyphMaskFormat(GrGlyph::PackedID) const;
- bool getPackedGlyphBounds(GrGlyph::PackedID, SkIRect* bounds);
- bool getPackedGlyphImage(GrGlyph::PackedID, int width, int height,
- int rowBytes, void* image);
- bool getPackedGlyphDFBounds(GrGlyph::PackedID, SkIRect* bounds);
- bool getPackedGlyphDFImage(GrGlyph::PackedID, int width, int height,
- void* image);
- bool getGlyphPath(uint16_t glyphID, SkPath*);
-
-private:
- SkGlyphCache* fStrike;
- GrFontDescKey* fKey;
-
- typedef SkRefCnt INHERITED;
-};
-
-#endif