Index: src/gpu/GrAtlasTextContext.h |
diff --git a/src/gpu/GrBitmapTextContext.h b/src/gpu/GrAtlasTextContext.h |
similarity index 77% |
copy from src/gpu/GrBitmapTextContext.h |
copy to src/gpu/GrAtlasTextContext.h |
index 1f8a82f35aae21690d556eac28ebc38eb50db74d..d0c92b9e1f4ef48442c4f8fac70677a46b27099c 100644 |
--- a/src/gpu/GrBitmapTextContext.h |
+++ b/src/gpu/GrAtlasTextContext.h |
@@ -1,17 +1,16 @@ |
/* |
- * Copyright 2013 Google Inc. |
+ * 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 GrBitmapTextContext_DEFINED |
-#define GrBitmapTextContext_DEFINED |
+#ifndef GrAtlasTextContext_DEFINED |
+#define GrAtlasTextContext_DEFINED |
#include "GrTextContext.h" |
#include "GrGeometryProcessor.h" |
-#include "GrMemoryPool.h" |
#include "SkDescriptor.h" |
#include "SkTHash.h" |
@@ -180,51 +179,4 @@ private: |
typedef GrTextContext INHERITED; |
}; |
-class GrTextStrike; |
- |
-/* |
- * This class implements GrTextContext using standard bitmap fonts |
- */ |
-class GrBitmapTextContext : public GrTextContext { |
-public: |
- static GrBitmapTextContext* Create(GrContext*, SkGpuDevice*, const SkDeviceProperties&); |
- |
- virtual ~GrBitmapTextContext() {} |
- |
-private: |
- GrTextStrike* fStrike; |
- void* fVertices; |
- int fCurrVertex; |
- int fAllocVertexCount; |
- int fTotalVertexCount; |
- SkRect fVertexBounds; |
- GrTexture* fCurrTexture; |
- GrMaskFormat fCurrMaskFormat; |
- SkAutoTUnref<const GrGeometryProcessor> fCachedGeometryProcessor; |
- // Used to check whether fCachedEffect is still valid. |
- uint32_t fEffectTextureUniqueID; |
- SkMatrix fLocalMatrix; |
- |
- GrBitmapTextContext(GrContext*, SkGpuDevice*, const SkDeviceProperties&); |
- |
- bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&, |
- const SkPaint&, const SkMatrix& viewMatrix) override; |
- |
- void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, |
- const SkMatrix& viewMatrix, const char text[], size_t byteLength, |
- SkScalar x, SkScalar y, const SkIRect& regionClipBounds) override; |
- void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, |
- const SkMatrix& viewMatrix, |
- const char text[], size_t byteLength, |
- const SkScalar pos[], int scalarsPerPosition, |
- const SkPoint& offset, const SkIRect& regionClipBounds) override; |
- |
- void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, |
- const SkIRect& regionClipBounds); |
- void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler*); |
- bool uploadGlyph(GrGlyph*, GrFontScaler*); |
- void flush(); // automatically called by destructor |
- void finish(); |
-}; |
- |
#endif |