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

Unified Diff: src/gpu/GrAtlasTextContext.h

Issue 1045723010: move Atlas Text Context to its own file (Closed) Base URL: https://skia.googlesource.com/skia.git@bmptext3
Patch Set: rebase Created 5 years, 9 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 | « gyp/gpu.gypi ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698