diff options
author | 2015-03-03 08:34:14 -0800 | |
---|---|---|
committer | 2015-03-03 08:34:14 -0800 | |
commit | c2574f3657b1359496a4eba5b191961974b3a64f (patch) | |
tree | 4837addb7e2b9df8d35faa943408cb25aa206fbc /src/device | |
parent | 00d39bcbfc8394a9b48b86b04ab06ec19091fa43 (diff) |
Revert of XPS, DM: add SkDocument::CreateXPS (patchset #8 id:310001 of https://codereview.chromium.org/963953002/)
Reason for revert:
breaking iOS build.
Original issue's description:
> XPS, DM: add SkDocument::CreateXPS
>
> - SkDocument::CreateXPS() function added, returns NULL on non-Windows OS.
>
> - DM: (Windows only) an XPSSink is added, fails on non-Windows OS
>
> - DM: Common code for PDFSink::draw and XPSSink::draw are factored into
> draw_skdocument static function.
>
> - SkDocument_XPS (Windows only) implementation of SkDocument via
> SkXPSDevice.
>
> - SkDocument_XPS_None (non-Windows) returns NULL for
> SkDocument::CreateXPS().
>
> - gyp/xps.gyp refactored.
>
> - SkXPSDevice::drawTextOnPath removed (see http://crrev.com/925343003 )
>
> - SkXPSDevice::drawPath supports conics via SkAutoConicToQuads.
>
> NOPRESUBMIT=true
>
> Committed: https://skia.googlesource.com/skia/+/00d39bcbfc8394a9b48b86b04ab06ec19091fa43
TBR=reed@google.com,bungeman@google.com,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/978443002
Diffstat (limited to 'src/device')
-rw-r--r-- | src/device/xps/SkXPSDevice.cpp | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/src/device/xps/SkXPSDevice.cpp b/src/device/xps/SkXPSDevice.cpp index 3bb87b32a3..c1105a2e94 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 @@ HRESULT SkXPSDevice::addXpsPathGeometry( 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 @@ void SkXPSDevice::drawPosText(const SkDraw& d, 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&) { |