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

Unified Diff: src/fonts/SkRandomScalerContext.h

Issue 1275393003: Fix for 510931, merge to m44 (Closed) Base URL: https://skia.googlesource.com/skia.git@m44
Patch Set: Created 5 years, 4 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/core/SkScalerContext.h ('k') | src/fonts/SkRandomScalerContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fonts/SkRandomScalerContext.h
diff --git a/src/fonts/SkGScalerContext.h b/src/fonts/SkRandomScalerContext.h
similarity index 75%
copy from src/fonts/SkGScalerContext.h
copy to src/fonts/SkRandomScalerContext.h
index 75f3ebedbdeadc980f47f6d9c17b08cb696f5fa5..24b203f05c71175853cb92240744aef2e8207d77 100644
--- a/src/fonts/SkGScalerContext.h
+++ b/src/fonts/SkRandomScalerContext.h
@@ -1,20 +1,25 @@
/*
- * 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 SkGScalerContext_DEFINED
-#define SkGScalerContext_DEFINED
+#ifndef SkRandomScalerContext_DEFINED
+#define SkRandomScalerContext_DEFINED
#include "SkScalerContext.h"
#include "SkTypeface.h"
-class SkGTypeface : public SkTypeface {
+/*
+ * This scaler context is for debug only purposes. It will 'randomly' but deterministically return
+ * LCD / A8 / BW / RBGA masks based off of the Glyph ID
+ */
+
+class SkRandomTypeface : public SkTypeface {
public:
- SkGTypeface(SkTypeface* proxy, const SkPaint&);
- virtual ~SkGTypeface();
+ SkRandomTypeface(SkTypeface* proxy, const SkPaint&, bool fakeit);
+ virtual ~SkRandomTypeface();
SkTypeface* proxy() const { return fProxy; }
const SkPaint& paint() const { return fPaint; }
@@ -44,6 +49,7 @@ protected:
private:
SkTypeface* fProxy;
SkPaint fPaint;
+ bool fFakeIt;
};
#endif
« no previous file with comments | « src/core/SkScalerContext.h ('k') | src/fonts/SkRandomScalerContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698