}
DrawTextOnPath::DrawTextOnPath(const void* text, size_t byteLength,
- const SkPath& path, const SkMatrix* matrix,
+ const SkPath& path, const SkMatrix* matrix,
const SkPaint& paint) {
fText = new char[byteLength];
memcpy(fText, text, byteLength);
}
DrawVertices::DrawVertices(SkCanvas::VertexMode vmode, int vertexCount,
- const SkPoint vertices[], const SkPoint texs[],
- const SkColor colors[], SkXfermode* xfermode,
+ const SkPoint vertices[], const SkPoint texs[],
+ const SkColor colors[], SkXfermode* xfermode,
const uint16_t indices[], int indexCount,
const SkPaint& paint) {
fVmode = vmode;
class DrawVertices : public SkDrawCommand {
public:
DrawVertices(SkCanvas::VertexMode vmode, int vertexCount,
- const SkPoint vertices[], const SkPoint texs[],
- const SkColor colors[], SkXfermode* xfermode,
+ const SkPoint vertices[], const SkPoint texs[],
+ const SkColor colors[], SkXfermode* xfermode,
const uint16_t indices[], int indexCount,
const SkPaint& paint);
virtual ~DrawVertices();
static LCDOrder GetSubpixelOrder();
private:
-
+
/**
* DEPRECATED -- will be DESTROYED
*
virtual SkTypeface* onCreateFromData(SkData*, int ttcIndex) = 0;
virtual SkTypeface* onCreateFromStream(SkStream*, int ttcIndex) = 0;
virtual SkTypeface* onCreateFromFile(const char path[], int ttcIndex) = 0;
-
+
private:
static SkFontMgr* Factory(); // implemented by porting layer
static SkMutex* Mutex(); // implemented by porting layer
-
+
typedef SkRefCnt INHERITED;
};
? SkFontStream::GetTableData(stream, ttcIndex, tag, offset, length, data)
: 0;
}
-
fHWAALineSupport = false;
fShaderDerivativeSupport = false;
fGeometryShaderSupport = false;
- fDualSourceBlendingSupport = false;
+ fDualSourceBlendingSupport = false;
fBufferLockSupport = false;
fPathStencilingSupport = false;
desc->setFamilyName(this->getFamilyName());
*isLocalStream = SkToBool(this->getLocalStream());
}
-
virtual SkFontStyleSet* onCreateStyleSet(int index) SK_OVERRIDE {
return NULL;
}
-
+
virtual SkTypeface* onMatchFamilyStyle(const char familyName[],
const SkFontStyle&) SK_OVERRIDE {
return NULL;
}
-
+
virtual SkTypeface* onMatchFaceStyle(const SkTypeface* familyMember,
const SkFontStyle&) SK_OVERRIDE {
return NULL;
}
-
+
virtual SkTypeface* onCreateFromData(SkData* data,
int ttcIndex) SK_OVERRIDE {
AutoCFRelease<CGDataProviderRef> pr(SkCreateDataProviderFromData(data));
CGDataProviderRef SkCreateDataProviderFromStream(SkStream* stream) {
stream->ref(); // unref will be called when the provider is deleted
-
+
const void* addr = stream->getMemoryBase();
if (addr) {
// special-case when the stream is just a block of ram
return CGDataProviderCreateWithData(stream, addr, stream->getLength(),
unref_proc);
}
-
+
CGDataProviderSequentialCallbacks rec;
sk_bzero(&rec, sizeof(rec));
rec.version = 0;
return CGDataProviderCreateWithData(data, data->data(), data->size(),
unref_proc);
}
-