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

Unified Diff: src/device/xps/SkXPSDevice.cpp

Issue 978443002: Revert of XPS, DM: add SkDocument::CreateXPS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « include/device/xps/SkXPSDevice.h ('k') | src/doc/SkDocument_XPS.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/device/xps/SkXPSDevice.cpp
diff --git a/src/device/xps/SkXPSDevice.cpp b/src/device/xps/SkXPSDevice.cpp
index 3bb87b32a3335af86bd00009de9e670373c99e53..c1105a2e94c034eb6b0dac5aee6bc20ad5fa5d4b 100644
--- a/src/device/xps/SkXPSDevice.cpp
+++ b/src/device/xps/SkXPSDevice.cpp
@@ -5,14 +5,13 @@
* found in the LICENSE file.
*/
-#include "SkTypes.h"
-
#ifndef UNICODE
#define UNICODE
#endif
#ifndef _UNICODE
#define _UNICODE
#endif
+#include "SkTypes.h"
#include <ObjBase.h>
#include <XpsObjectModel.h>
#include <T2EmbApi.h>
@@ -24,7 +23,6 @@
#include "SkDraw.h"
#include "SkDrawProcs.h"
#include "SkEndian.h"
-#include "SkGeometry.h"
#include "SkGlyphCache.h"
#include "SkHRESULT.h"
#include "SkImageEncoder.h"
@@ -1365,21 +1363,6 @@
segmentData.push(SkScalarToFLOAT(points[3].fX));
segmentData.push(SkScalarToFLOAT(points[3].fY));
break;
- case SkPath::kConic_Verb: {
- const SkScalar tol = SK_Scalar1 / 4;
- SkAutoConicToQuads converter;
- const SkPoint* quads =
- converter.computeQuads(points, iter.conicWeight(), tol);
- for (int i = 0; i < converter.countQuads(); ++i) {
- segmentTypes.push(XPS_SEGMENT_TYPE_QUADRATIC_BEZIER);
- segmentStrokes.push(stroke);
- segmentData.push(SkScalarToFLOAT(quads[2 * i + 1].fX));
- segmentData.push(SkScalarToFLOAT(quads[2 * i + 1].fY));
- segmentData.push(SkScalarToFLOAT(quads[2 * i + 2].fX));
- segmentData.push(SkScalarToFLOAT(quads[2 * i + 2].fY));
- }
- break;
- }
case SkPath::kClose_Verb:
// we ignore these, and just get the whole segment from
// the corresponding line/quad/cubic verbs
@@ -2224,6 +2207,13 @@
paint));
}
+void SkXPSDevice::drawTextOnPath(const SkDraw& d, const void* text, size_t len,
+ const SkPath& path, const SkMatrix* matrix,
+ const SkPaint& paint) {
+ //This will call back into the device to do the drawing.
+ d.drawTextOnPath((const char*)text, len, path, matrix, paint);
+}
+
void SkXPSDevice::drawDevice(const SkDraw& d, SkBaseDevice* dev,
int x, int y,
const SkPaint&) {
« no previous file with comments | « include/device/xps/SkXPSDevice.h ('k') | src/doc/SkDocument_XPS.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698