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

Unified Diff: src/gpu/GrTextUtils.h

Issue 1514933002: Create GrTextUtils (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanuptext9
Patch Set: Created 5 years 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/gpu/GrTextContext.cpp ('k') | src/gpu/GrTextUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextUtils.h
diff --git a/src/gpu/GrTextUtils.h b/src/gpu/GrTextUtils.h
new file mode 100644
index 0000000000000000000000000000000000000000..cd2067f4645eea2a5e3b86756f1d4a272659cdfc
--- /dev/null
+++ b/src/gpu/GrTextUtils.h
@@ -0,0 +1,45 @@
+/*
+ * 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 GrTextUtils_DEFINED
+#define GrTextUtils_DEFINED
+
+#include "SkScalar.h"
+
+class GrClip;
+class GrContext;
+class GrDrawContext;
+class SkMatrix;
+struct SkIRect;
+class SkPaint;
+struct SkPoint;
+class SkSurfaceProps;
+
+/*
+ * A class to house a bunch of common text utilities. This class should *ONLY* have static
+ * functions. It is not a namespace only because we wish to friend SkPaint
+ *
+ */
+class GrTextUtils {
+public:
+
+static void DrawTextAsPath(GrContext*, GrDrawContext*, const GrClip& clip,
+ const SkPaint& origPaint, const SkMatrix& viewMatrix,
+ const char text[], size_t byteLength, SkScalar x, SkScalar y,
+ const SkIRect& clipBounds);
+
+static void DrawPosTextAsPath(GrContext* context,
+ GrDrawContext* dc,
+ const SkSurfaceProps& props,
+ const GrClip& clip,
+ const SkPaint& origPaint, const SkMatrix& viewMatrix,
+ const char text[], size_t byteLength,
+ const SkScalar pos[], int scalarsPerPosition,
+ const SkPoint& offset, const SkIRect& clipBounds);
+};
+
+#endif
« no previous file with comments | « src/gpu/GrTextContext.cpp ('k') | src/gpu/GrTextUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698