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

Unified Diff: tools/using_skia_and_harfbuzz.cpp

Issue 1947903002: tools/using_skia_and_harfbuzz: minor cleanup (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/using_skia_and_harfbuzz.cpp
diff --git a/tools/using_skia_and_harfbuzz.cpp b/tools/using_skia_and_harfbuzz.cpp
index 8ed213c46c91a42507190aacf15e54f81e2c4f18..413939d15b7f35ab89d65cfd0ec817c1bacffc72 100644
--- a/tools/using_skia_and_harfbuzz.cpp
+++ b/tools/using_skia_and_harfbuzz.cpp
@@ -5,24 +5,21 @@
* found in the LICENSE file.
*/
-#include "SkCanvas.h"
-#include "SkDocument.h"
-#include "SkFontMgr.h"
-#include "SkGradientShader.h"
-#include "SkPaint.h"
-#include "SkStream.h"
-#include "SkString.h"
-#include "SkTextBlob.h"
-#include "SkTypeface.h"
-
-#include <hb.h>
-#include <hb-ot.h>
+// This sample progam demonstrates how to use Skia and HarfBuzz to
+// produce a PDF file from UTF-8 text in stdin.
#include <cassert>
#include <iostream>
#include <map>
#include <string>
+#include <hb-ot.h>
+
+#include "SkCanvas.h"
+#include "SkDocument.h"
+#include "SkStream.h"
+#include "SkTextBlob.h"
+#include "SkTypeface.h"
struct BaseOption {
std::string selector;
@@ -207,7 +204,6 @@ class Placement {
SkPaint::kSubpixelText_Flag); // ... avoid waggly text when rotating.
glyph_paint.setColor(SK_ColorBLACK);
glyph_paint.setTextSize(config.font_size->value);
- SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault());
glyph_paint.setTypeface(face->fSkiaTypeface);
glyph_paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698