Update files to use SK_BUILD_FOR_ANDROID.
This CL also removes any unecessary references to the ANDROID definition. Review URL: http://codereview.appspot.com/5354049 git-svn-id: http://skia.googlecode.com/svn/trunk@2629 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
6245ab718d
commit
56c69773ae
@ -24,7 +24,7 @@
|
|||||||
#include "SkPicture.h"
|
#include "SkPicture.h"
|
||||||
#include "SkString.h"
|
#include "SkString.h"
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
static void log_error(const char msg[]) { SkDebugf("%s", msg); }
|
static void log_error(const char msg[]) { SkDebugf("%s", msg); }
|
||||||
static void log_progress(const char msg[]) { SkDebugf("%s", msg); }
|
static void log_progress(const char msg[]) { SkDebugf("%s", msg); }
|
||||||
#else
|
#else
|
||||||
|
@ -723,7 +723,7 @@ public:
|
|||||||
const SkPath& path, const SkMatrix* matrix,
|
const SkPath& path, const SkMatrix* matrix,
|
||||||
const SkPaint& paint);
|
const SkPaint& paint);
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
/** Draw the text on path, with each character/glyph origin specified by the pos[]
|
/** Draw the text on path, with each character/glyph origin specified by the pos[]
|
||||||
array. The origin is interpreted by the Align setting in the paint.
|
array. The origin is interpreted by the Align setting in the paint.
|
||||||
@param text The text to be drawn
|
@param text The text to be drawn
|
||||||
|
@ -220,7 +220,7 @@ protected:
|
|||||||
virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len,
|
virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len,
|
||||||
const SkPath& path, const SkMatrix* matrix,
|
const SkPath& path, const SkMatrix* matrix,
|
||||||
const SkPaint& paint);
|
const SkPaint& paint);
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
virtual void drawPosTextOnPath(const SkDraw& draw, const void* text, size_t len,
|
virtual void drawPosTextOnPath(const SkDraw& draw, const void* text, size_t len,
|
||||||
const SkPoint pos[], const SkPaint& paint,
|
const SkPoint pos[], const SkPaint& paint,
|
||||||
const SkPath& path, const SkMatrix* matrix);
|
const SkPath& path, const SkMatrix* matrix);
|
||||||
|
@ -55,7 +55,7 @@ public:
|
|||||||
int scalarsPerPosition, const SkPaint& paint) const;
|
int scalarsPerPosition, const SkPaint& paint) const;
|
||||||
void drawTextOnPath(const char text[], size_t byteLength,
|
void drawTextOnPath(const char text[], size_t byteLength,
|
||||||
const SkPath&, const SkMatrix*, const SkPaint&) const;
|
const SkPath&, const SkMatrix*, const SkPaint&) const;
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
void drawPosTextOnPath(const char text[], size_t byteLength,
|
void drawPosTextOnPath(const char text[], size_t byteLength,
|
||||||
const SkPoint pos[], const SkPaint& paint,
|
const SkPoint pos[], const SkPaint& paint,
|
||||||
const SkPath& path, const SkMatrix* matrix) const;
|
const SkPath& path, const SkMatrix* matrix) const;
|
||||||
|
@ -278,7 +278,7 @@ public:
|
|||||||
static void SetSubpixelOrder(LCDOrder order);
|
static void SetSubpixelOrder(LCDOrder order);
|
||||||
static LCDOrder GetSubpixelOrder();
|
static LCDOrder GetSubpixelOrder();
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -818,7 +818,7 @@ public:
|
|||||||
void getTextPath(const void* text, size_t length, SkScalar x, SkScalar y,
|
void getTextPath(const void* text, size_t length, SkScalar x, SkScalar y,
|
||||||
SkPath* path) const;
|
SkPath* path) const;
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
const SkGlyph& getUnicharMetrics(SkUnichar);
|
const SkGlyph& getUnicharMetrics(SkUnichar);
|
||||||
const void* findImage(const SkGlyph&);
|
const void* findImage(const SkGlyph&);
|
||||||
|
|
||||||
@ -854,7 +854,7 @@ private:
|
|||||||
unsigned fStyle : 2;
|
unsigned fStyle : 2;
|
||||||
unsigned fTextEncoding : 2; // 3 values
|
unsigned fTextEncoding : 2; // 3 values
|
||||||
unsigned fHinting : 2;
|
unsigned fHinting : 2;
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
uint32_t fGenerationID;
|
uint32_t fGenerationID;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "SkMatrix.h"
|
#include "SkMatrix.h"
|
||||||
#include "SkTDArray.h"
|
#include "SkTDArray.h"
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
#define GEN_ID_INC fGenerationID++
|
#define GEN_ID_INC fGenerationID++
|
||||||
#define GEN_ID_PTR_INC(ptr) ptr->fGenerationID++
|
#define GEN_ID_PTR_INC(ptr) ptr->fGenerationID++
|
||||||
#else
|
#else
|
||||||
@ -646,7 +646,7 @@ public:
|
|||||||
void flatten(SkWriter32&) const;
|
void flatten(SkWriter32&) const;
|
||||||
void unflatten(SkReader32&);
|
void unflatten(SkReader32&);
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
uint32_t getGenerationID() const;
|
uint32_t getGenerationID() const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -660,7 +660,7 @@ private:
|
|||||||
uint8_t fSegmentMask;
|
uint8_t fSegmentMask;
|
||||||
mutable uint8_t fBoundsIsDirty;
|
mutable uint8_t fBoundsIsDirty;
|
||||||
mutable uint8_t fConvexity;
|
mutable uint8_t fConvexity;
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
uint32_t fGenerationID;
|
uint32_t fGenerationID;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ public:
|
|||||||
virtual Factory getFactory() const { return NULL; }
|
virtual Factory getFactory() const { return NULL; }
|
||||||
virtual void flatten(SkFlattenableWriteBuffer&) const;
|
virtual void flatten(SkFlattenableWriteBuffer&) const;
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
/**
|
/**
|
||||||
* Acquire a "global" ref on this object.
|
* Acquire a "global" ref on this object.
|
||||||
* The default implementation just calls ref(), but subclasses can override
|
* The default implementation just calls ref(), but subclasses can override
|
||||||
|
@ -283,7 +283,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool op(const SkRegion& rgna, const SkRegion& rgnb, Op op);
|
bool op(const SkRegion& rgna, const SkRegion& rgnb, Op op);
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
/** Returns a new char* containing the list of rectangles in this region
|
/** Returns a new char* containing the list of rectangles in this region
|
||||||
*/
|
*/
|
||||||
char* toString();
|
char* toString();
|
||||||
|
@ -21,7 +21,7 @@ public:
|
|||||||
typedef T (*Factory)(P);
|
typedef T (*Factory)(P);
|
||||||
|
|
||||||
SkTRegistry(Factory fact) {
|
SkTRegistry(Factory fact) {
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
// work-around for double-initialization bug
|
// work-around for double-initialization bug
|
||||||
{
|
{
|
||||||
SkTRegistry* reg = gHead;
|
SkTRegistry* reg = gHead;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#ifndef SkThread_platform_DEFINED
|
#ifndef SkThread_platform_DEFINED
|
||||||
#define SkThread_platform_DEFINED
|
#define SkThread_platform_DEFINED
|
||||||
|
|
||||||
#if defined(ANDROID) && !defined(SK_BUILD_FOR_ANDROID_NDK)
|
#if defined(SK_BUILD_FOR_ANDROID) && !defined(SK_BUILD_FOR_ANDROID_NDK)
|
||||||
|
|
||||||
#include <utils/threads.h>
|
#include <utils/threads.h>
|
||||||
#include <utils/Atomic.h>
|
#include <utils/Atomic.h>
|
||||||
|
@ -32,7 +32,7 @@ void sk_memset32_portable(uint32_t dst[], uint32_t value, int count);
|
|||||||
typedef void (*SkMemset32Proc)(uint32_t dst[], uint32_t value, int count);
|
typedef void (*SkMemset32Proc)(uint32_t dst[], uint32_t value, int count);
|
||||||
SkMemset32Proc SkMemset32GetPlatformProc();
|
SkMemset32Proc SkMemset32GetPlatformProc();
|
||||||
|
|
||||||
#if defined(ANDROID) && !defined(SK_BUILD_FOR_ANDROID_NDK)
|
#if defined(SK_BUILD_FOR_ANDROID) && !defined(SK_BUILD_FOR_ANDROID_NDK)
|
||||||
#include "cutils/memory.h"
|
#include "cutils/memory.h"
|
||||||
|
|
||||||
#define sk_memset16(dst, value, count) android_memset16(dst, value, (count) << 1)
|
#define sk_memset16(dst, value, count) android_memset16(dst, value, (count) << 1)
|
||||||
|
@ -45,7 +45,7 @@ public:
|
|||||||
kMultiply_Mode, //!< [Sa * Da, Sc * Dc]
|
kMultiply_Mode, //!< [Sa * Da, Sc * Dc]
|
||||||
kScreen_Mode, //!< [Sa + Da - Sa * Da, Sc + Dc - Sc * Dc]
|
kScreen_Mode, //!< [Sa + Da - Sa * Da, Sc + Dc - Sc * Dc]
|
||||||
kAdd_Mode, //!< Saturate(S + D)
|
kAdd_Mode, //!< Saturate(S + D)
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
kOverlay_Mode,
|
kOverlay_Mode,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
#undef GR_IOS_BUILD
|
#undef GR_IOS_BUILD
|
||||||
#define GR_IOS_BUILD 1
|
#define GR_IOS_BUILD 1
|
||||||
// #error "IOS"
|
// #error "IOS"
|
||||||
#elif (defined(ANDROID_NDK) && ANDROID_NDK) || defined(ANDROID)
|
#elif defined(SK_BUILD_FOR_ANDROID)
|
||||||
#undef GR_ANDROID_BUILD
|
#undef GR_ANDROID_BUILD
|
||||||
#define GR_ANDROID_BUILD 1
|
#define GR_ANDROID_BUILD 1
|
||||||
// #error "ANDROID"
|
// #error "ANDROID"
|
||||||
|
@ -150,7 +150,7 @@ public:
|
|||||||
void rotateY(SkScalar deg);
|
void rotateY(SkScalar deg);
|
||||||
void rotateZ(SkScalar deg);
|
void rotateZ(SkScalar deg);
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
void setCameraLocation(SkScalar x, SkScalar y, SkScalar z);
|
void setCameraLocation(SkScalar x, SkScalar y, SkScalar z);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ private:
|
|||||||
#include "SkOSWindow_Mac.h"
|
#include "SkOSWindow_Mac.h"
|
||||||
#elif defined(SK_BUILD_FOR_WIN)
|
#elif defined(SK_BUILD_FOR_WIN)
|
||||||
#include "SkOSWindow_Win.h"
|
#include "SkOSWindow_Win.h"
|
||||||
#elif defined(ANDROID)
|
#elif defined(SK_BUILD_FOR_ANDROID)
|
||||||
#include "SkOSWindow_Android.h"
|
#include "SkOSWindow_Android.h"
|
||||||
#elif defined(SK_BUILD_FOR_UNIX)
|
#elif defined(SK_BUILD_FOR_UNIX)
|
||||||
#include "SkOSWindow_Unix.h"
|
#include "SkOSWindow_Unix.h"
|
||||||
|
@ -1041,7 +1041,7 @@ void SampleWindow::afterChildren(SkCanvas* orig) {
|
|||||||
SkPDFDocument doc;
|
SkPDFDocument doc;
|
||||||
SkPDFDevice* device = static_cast<SkPDFDevice*>(fPdfCanvas->getDevice());
|
SkPDFDevice* device = static_cast<SkPDFDevice*>(fPdfCanvas->getDevice());
|
||||||
doc.appendPage(device);
|
doc.appendPage(device);
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
name.prepend("/sdcard/");
|
name.prepend("/sdcard/");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1787,7 +1787,7 @@ void SampleWindow::onSizeChange() {
|
|||||||
fZoomCenterX = SkScalarHalf(this->width());
|
fZoomCenterX = SkScalarHalf(this->width());
|
||||||
fZoomCenterY = SkScalarHalf(this->height());
|
fZoomCenterY = SkScalarHalf(this->height());
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
// FIXME: The first draw after a size change does not work on Android, so
|
// FIXME: The first draw after a size change does not work on Android, so
|
||||||
// we post an invalidate.
|
// we post an invalidate.
|
||||||
this->postInvalDelay();
|
this->postInvalDelay();
|
||||||
|
@ -255,7 +255,7 @@ bool SkDisplayEvent::setProperty(int index, SkScriptValue& value) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
|
|
||||||
#include "SkMetaData.h"
|
#include "SkMetaData.h"
|
||||||
#include "SkParse.h"
|
#include "SkParse.h"
|
||||||
|
@ -7,12 +7,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef __arm__
|
|
||||||
#ifdef ANDROID
|
|
||||||
#include <machine/cpu-features.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "SkColorPriv.h"
|
#include "SkColorPriv.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1617,7 +1617,7 @@ void SkCanvas::drawTextOnPath(const void* text, size_t byteLength,
|
|||||||
LOOPER_END
|
LOOPER_END
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
void SkCanvas::drawPosTextOnPath(const void* text, size_t byteLength,
|
void SkCanvas::drawPosTextOnPath(const void* text, size_t byteLength,
|
||||||
const SkPoint pos[], const SkPaint& paint,
|
const SkPoint pos[], const SkPaint& paint,
|
||||||
const SkPath& path, const SkMatrix* matrix) {
|
const SkPath& path, const SkMatrix* matrix) {
|
||||||
|
@ -410,7 +410,7 @@ void SkDevice::drawTextOnPath(const SkDraw& draw, const void* text,
|
|||||||
draw.drawTextOnPath((const char*)text, len, path, matrix, paint);
|
draw.drawTextOnPath((const char*)text, len, path, matrix, paint);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
void SkDevice::drawPosTextOnPath(const SkDraw& draw, const void* text, size_t len,
|
void SkDevice::drawPosTextOnPath(const SkDraw& draw, const void* text, size_t len,
|
||||||
const SkPoint pos[], const SkPaint& paint,
|
const SkPoint pos[], const SkPaint& paint,
|
||||||
const SkPath& path, const SkMatrix* matrix) {
|
const SkPath& path, const SkMatrix* matrix) {
|
||||||
|
@ -1973,7 +1973,7 @@ void SkDraw::drawTextOnPath(const char text[], size_t byteLength,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
void SkDraw::drawPosTextOnPath(const char text[], size_t byteLength,
|
void SkDraw::drawPosTextOnPath(const char text[], size_t byteLength,
|
||||||
const SkPoint pos[], const SkPaint& paint,
|
const SkPoint pos[], const SkPaint& paint,
|
||||||
const SkPath& path, const SkMatrix* matrix) const {
|
const SkPath& path, const SkMatrix* matrix) const {
|
||||||
|
@ -159,18 +159,12 @@ void ValidateHeap() {}
|
|||||||
|
|
||||||
void sk_throw()
|
void sk_throw()
|
||||||
{
|
{
|
||||||
#ifdef ANDROID
|
|
||||||
fprintf(stderr, "throwing...\n");
|
|
||||||
#endif
|
|
||||||
SkASSERT(!"sk_throw");
|
SkASSERT(!"sk_throw");
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
void sk_out_of_memory(void)
|
void sk_out_of_memory(void)
|
||||||
{
|
{
|
||||||
#ifdef ANDROID
|
|
||||||
fprintf(stderr,"- out of memory in SGL -\n");
|
|
||||||
#endif
|
|
||||||
SkASSERT(!"sk_out_of_memory");
|
SkASSERT(!"sk_out_of_memory");
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#define SK_DefaultFlags 0 //(kNativeHintsText_Flag)
|
#define SK_DefaultFlags 0 //(kNativeHintsText_Flag)
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
#define GEN_ID_INC fGenerationID++
|
#define GEN_ID_INC fGenerationID++
|
||||||
#define GEN_ID_INC_EVAL(expression) if (expression) { fGenerationID++; }
|
#define GEN_ID_INC_EVAL(expression) if (expression) { fGenerationID++; }
|
||||||
#else
|
#else
|
||||||
@ -71,7 +71,7 @@ SkPaint::SkPaint() {
|
|||||||
fStyle = kFill_Style;
|
fStyle = kFill_Style;
|
||||||
fTextEncoding = kUTF8_TextEncoding;
|
fTextEncoding = kUTF8_TextEncoding;
|
||||||
fHinting = kNormal_Hinting;
|
fHinting = kNormal_Hinting;
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
fGenerationID = 0;
|
fGenerationID = 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -125,11 +125,11 @@ SkPaint& SkPaint::operator=(const SkPaint& src) {
|
|||||||
SkSafeUnref(fLooper);
|
SkSafeUnref(fLooper);
|
||||||
SkSafeUnref(fImageFilter);
|
SkSafeUnref(fImageFilter);
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
uint32_t oldGenerationID = fGenerationID;
|
uint32_t oldGenerationID = fGenerationID;
|
||||||
#endif
|
#endif
|
||||||
memcpy(this, &src, sizeof(src));
|
memcpy(this, &src, sizeof(src));
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
fGenerationID = oldGenerationID + 1;
|
fGenerationID = oldGenerationID + 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -143,16 +143,16 @@ bool operator==(const SkPaint& a, const SkPaint& b) {
|
|||||||
void SkPaint::reset() {
|
void SkPaint::reset() {
|
||||||
SkPaint init;
|
SkPaint init;
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
uint32_t oldGenerationID = fGenerationID;
|
uint32_t oldGenerationID = fGenerationID;
|
||||||
#endif
|
#endif
|
||||||
*this = init;
|
*this = init;
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
fGenerationID = oldGenerationID + 1;
|
fGenerationID = oldGenerationID + 1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
uint32_t SkPaint::getGenerationID() const {
|
uint32_t SkPaint::getGenerationID() const {
|
||||||
return fGenerationID;
|
return fGenerationID;
|
||||||
}
|
}
|
||||||
@ -377,7 +377,7 @@ static void DetachDescProc(const SkDescriptor* desc, void* context) {
|
|||||||
*((SkGlyphCache**)context) = SkGlyphCache::DetachCache(desc);
|
*((SkGlyphCache**)context) = SkGlyphCache::DetachCache(desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
const SkGlyph& SkPaint::getUnicharMetrics(SkUnichar text) {
|
const SkGlyph& SkPaint::getUnicharMetrics(SkUnichar text) {
|
||||||
SkGlyphCache* cache;
|
SkGlyphCache* cache;
|
||||||
descriptorProc(NULL, DetachDescProc, &cache, true);
|
descriptorProc(NULL, DetachDescProc, &cache, true);
|
||||||
|
@ -93,7 +93,7 @@ SkPath::SkPath()
|
|||||||
, fBoundsIsDirty(true) {
|
, fBoundsIsDirty(true) {
|
||||||
fConvexity = kUnknown_Convexity;
|
fConvexity = kUnknown_Convexity;
|
||||||
fSegmentMask = 0;
|
fSegmentMask = 0;
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
fGenerationID = 0;
|
fGenerationID = 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -101,7 +101,7 @@ SkPath::SkPath()
|
|||||||
SkPath::SkPath(const SkPath& src) {
|
SkPath::SkPath(const SkPath& src) {
|
||||||
SkDEBUGCODE(src.validate();)
|
SkDEBUGCODE(src.validate();)
|
||||||
*this = src;
|
*this = src;
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
// the assignment operator above increments the ID so correct for that here
|
// the assignment operator above increments the ID so correct for that here
|
||||||
fGenerationID--;
|
fGenerationID--;
|
||||||
#endif
|
#endif
|
||||||
@ -156,7 +156,7 @@ void SkPath::swap(SkPath& other) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
uint32_t SkPath::getGenerationID() const {
|
uint32_t SkPath::getGenerationID() const {
|
||||||
return fGenerationID;
|
return fGenerationID;
|
||||||
}
|
}
|
||||||
|
@ -498,7 +498,7 @@ void SkPicturePlayback::draw(SkCanvas& canvas) {
|
|||||||
SkipClipRec skipRect, skipRegion, skipPath;
|
SkipClipRec skipRect, skipRegion, skipPath;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
SkAutoMutexAcquire autoMutex(fDrawMutex);
|
SkAutoMutexAcquire autoMutex(fDrawMutex);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "SkRegion.h"
|
#include "SkRegion.h"
|
||||||
#include "SkPictureFlat.h"
|
#include "SkPictureFlat.h"
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
#include "SkThread.h"
|
#include "SkThread.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ private:
|
|||||||
SkRefCntPlayback fRCPlayback;
|
SkRefCntPlayback fRCPlayback;
|
||||||
SkTypefacePlayback fTFPlayback;
|
SkTypefacePlayback fTFPlayback;
|
||||||
SkFactoryPlayback* fFactoryPlayback;
|
SkFactoryPlayback* fFactoryPlayback;
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
SkMutex fDrawMutex;
|
SkMutex fDrawMutex;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -159,7 +159,7 @@ const char* SkPixelRef::FactoryToName(Factory fact) {
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
void SkPixelRef::globalRef(void* data) {
|
void SkPixelRef::globalRef(void* data) {
|
||||||
this->ref();
|
this->ref();
|
||||||
}
|
}
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
#include "SkTemplates.h"
|
#include "SkTemplates.h"
|
||||||
#include "SkThread.h"
|
#include "SkThread.h"
|
||||||
|
|
||||||
#ifdef ANDROID
|
|
||||||
#include <stdio.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SkDEBUGCODE(int32_t gRgnAllocCounter;)
|
SkDEBUGCODE(int32_t gRgnAllocCounter;)
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@ -171,7 +167,7 @@ bool SkRegion::op(const SkRegion& rgn, const SkIRect& rect, Op op) {
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
char* SkRegion::toString()
|
char* SkRegion::toString()
|
||||||
{
|
{
|
||||||
Iterator iter(*this);
|
Iterator iter(*this);
|
||||||
|
@ -108,7 +108,7 @@ void sk_memset32_portable(uint32_t dst[], uint32_t value, int count) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(ANDROID) || defined(SK_BUILD_FOR_ANDROID_NDK)
|
#if !defined(SK_BUILD_FOR_ANDROID) || defined(SK_BUILD_FOR_ANDROID_NDK)
|
||||||
static void sk_memset16_stub(uint16_t dst[], uint16_t value, int count) {
|
static void sk_memset16_stub(uint16_t dst[], uint16_t value, int count) {
|
||||||
SkMemset16Proc proc = SkMemset16GetPlatformProc();
|
SkMemset16Proc proc = SkMemset16GetPlatformProc();
|
||||||
sk_memset16 = proc ? proc : sk_memset16_portable;
|
sk_memset16 = proc ? proc : sk_memset16_portable;
|
||||||
|
@ -82,7 +82,7 @@ bool SkBlurDrawLooper::next(SkCanvas* canvas, SkPaint* paint) {
|
|||||||
fState = kDone;
|
fState = kDone;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
SkColor blurColor;
|
SkColor blurColor;
|
||||||
blurColor = fBlurColor;
|
blurColor = fBlurColor;
|
||||||
if (SkColorGetA(blurColor) == 255) {
|
if (SkColorGetA(blurColor) == 255) {
|
||||||
|
@ -39,7 +39,7 @@ static const struct Pair {
|
|||||||
MAKE_PAIR(Multiply),
|
MAKE_PAIR(Multiply),
|
||||||
MAKE_PAIR(Screen),
|
MAKE_PAIR(Screen),
|
||||||
{ SkPorterDuff::kAdd_Mode, SkXfermode::kPlus_Mode },
|
{ SkPorterDuff::kAdd_Mode, SkXfermode::kPlus_Mode },
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
MAKE_PAIR(Overlay),
|
MAKE_PAIR(Overlay),
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef ANDROID
|
|
||||||
#include <machine/cpu-features.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "SkBitmapProcState.h"
|
#include "SkBitmapProcState.h"
|
||||||
#include "SkColorPriv.h"
|
#include "SkColorPriv.h"
|
||||||
#include "SkUtils.h"
|
#include "SkUtils.h"
|
||||||
|
@ -6,10 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef ANDROID
|
|
||||||
#include <machine/cpu-features.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "SkBlitRow.h"
|
#include "SkBlitRow.h"
|
||||||
#include "SkBlitMask.h"
|
#include "SkBlitMask.h"
|
||||||
#include "SkColorPriv.h"
|
#include "SkColorPriv.h"
|
||||||
@ -992,7 +988,7 @@ static void S32A_D565_Opaque_Dither_neon (uint16_t * SK_RESTRICT dst,
|
|||||||
|
|
||||||
/* calculate 'd', which will be 0..7 */
|
/* calculate 'd', which will be 0..7 */
|
||||||
/* dbase[] is 0..7; alpha is 0..256; 16 bits suffice */
|
/* dbase[] is 0..7; alpha is 0..256; 16 bits suffice */
|
||||||
#if ANDROID
|
#if SK_BUILD_FOR_ANDROID
|
||||||
/* SkAlpha255To256() semantic a+1 vs a+a>>7 */
|
/* SkAlpha255To256() semantic a+1 vs a+a>>7 */
|
||||||
alpha8 = vaddw_u8(vmovl_u8(sa), vdup_n_u8(1));
|
alpha8 = vaddw_u8(vmovl_u8(sa), vdup_n_u8(1));
|
||||||
#else
|
#else
|
||||||
|
@ -362,7 +362,7 @@ void Sk3DView::restore() {
|
|||||||
fRec = next;
|
fRec = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef SK_BUILD_FOR_ANDROID
|
||||||
void Sk3DView::setCameraLocation(SkScalar x, SkScalar y, SkScalar z) {
|
void Sk3DView::setCameraLocation(SkScalar x, SkScalar y, SkScalar z) {
|
||||||
// the camera location is passed in inches, set in pt
|
// the camera location is passed in inches, set in pt
|
||||||
SkScalar lz = z * SkFloatToScalar(72.0f);
|
SkScalar lz = z * SkFloatToScalar(72.0f);
|
||||||
|
Loading…
Reference in New Issue
Block a user