summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/base.xcodeproj/project.pbxproj2
-rw-r--r--skia/corecg/SkInterpolator.cpp2
-rw-r--r--skia/effects/SkGradientShader.cpp3
-rw-r--r--skia/include/SkColorPriv.h8
-rw-r--r--skia/include/corecg/SkMath.h2
-rw-r--r--skia/picture/SkPictureFlat.h2
-rw-r--r--skia/sgl/SkGeometry.cpp8
-rw-r--r--skia/sgl/SkPaint.cpp20
-rw-r--r--skia/sgl/SkScalerContext.cpp11
-rw-r--r--skia/sgl/SkScan.h8
-rw-r--r--skia/sgl/SkScan_Path.cpp2
-rw-r--r--skia/sgl/SkUtils.cpp2
-rw-r--r--skia/sgl/SkWriter32.cpp9
13 files changed, 18 insertions, 61 deletions
diff --git a/base/base.xcodeproj/project.pbxproj b/base/base.xcodeproj/project.pbxproj
index df8e906..3ae34ed 100644
--- a/base/base.xcodeproj/project.pbxproj
+++ b/base/base.xcodeproj/project.pbxproj
@@ -1364,7 +1364,6 @@
baseConfigurationReference = 7BED30C70E59F63000A747DB /* staticlib.xcconfig */;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = "$(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Versions/A/Frameworks";
- GCC_TREAT_WARNINGS_AS_ERRORS = NO;
HEADER_SEARCH_PATHS = (
..,
../skia/include,
@@ -1380,7 +1379,6 @@
baseConfigurationReference = 7BED30C70E59F63000A747DB /* staticlib.xcconfig */;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = "$(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Versions/A/Frameworks";
- GCC_TREAT_WARNINGS_AS_ERRORS = NO;
HEADER_SEARCH_PATHS = (
..,
../skia/include,
diff --git a/skia/corecg/SkInterpolator.cpp b/skia/corecg/SkInterpolator.cpp
index 61ebf2b..1576708 100644
--- a/skia/corecg/SkInterpolator.cpp
+++ b/skia/corecg/SkInterpolator.cpp
@@ -80,7 +80,7 @@ SkInterpolatorBase::Result SkInterpolatorBase::timeToT(SkMSec time, SkScalar* T,
SkASSERT(fFrameCount > 0);
Result result = kNormal_Result;
if (fRepeat != SK_Scalar1) {
- SkMSec startTime, endTime;
+ SkMSec startTime = 0, endTime = 0;
this->getDuration(&startTime, &endTime);
SkMSec totalTime = endTime - startTime;
SkMSec offsetTime = time - startTime;
diff --git a/skia/effects/SkGradientShader.cpp b/skia/effects/SkGradientShader.cpp
index b296c15..1f279f9 100644
--- a/skia/effects/SkGradientShader.cpp
+++ b/skia/effects/SkGradientShader.cpp
@@ -607,12 +607,15 @@ private:
typedef Gradient_Shader INHERITED;
};
+#if 0
+// Used by a section that's currently #if 0 Linear_Gradient::shadeSpan
// Return true if fx, fx+dx, fx+2*dx, ... is always in range
static bool no_need_for_clamp(int fx, int dx, int count)
{
SkASSERT(count > 0);
return (unsigned)((fx | (fx + (count - 1) * dx)) >> 8) <= 0xFF;
}
+#endif
void Linear_Gradient::shadeSpan(int x, int y, SkPMColor dstC[], int count)
{
diff --git a/skia/include/SkColorPriv.h b/skia/include/SkColorPriv.h
index f35aa24..477af0d 100644
--- a/skia/include/SkColorPriv.h
+++ b/skia/include/SkColorPriv.h
@@ -402,7 +402,7 @@ typedef uint16_t SkPMColor16;
#define SkG32To4444(g) ((unsigned)(g) >> 4)
#define SkB32To4444(b) ((unsigned)(b) >> 4)
-static U8CPU SkReplicateNibble(unsigned nib)
+static inline U8CPU SkReplicateNibble(unsigned nib)
{
SkASSERT(nib <= 0xF);
return (nib << 4) | nib;
@@ -618,7 +618,7 @@ static inline SkPMColor16 SkDitherPixel32To4444(SkPMColor c)
Transforms a normal ARGB_8888 into the same byte order as
expanded ARGB_4444, but keeps each component 8bits
*/
-static uint32_t SkExpand_8888(SkPMColor c)
+static inline uint32_t SkExpand_8888(SkPMColor c)
{
return (((c >> SK_R32_SHIFT) & 0xFF) << 24) |
(((c >> SK_G32_SHIFT) & 0xFF) << 8) |
@@ -629,7 +629,7 @@ static uint32_t SkExpand_8888(SkPMColor c)
/* Undo the operation of SkExpand_8888, turning the argument back into
a SkPMColor.
*/
-static SkPMColor SkCompact_8888(uint32_t c)
+static inline SkPMColor SkCompact_8888(uint32_t c)
{
return (((c >> 24) & 0xFF) << SK_R32_SHIFT) |
(((c >> 8) & 0xFF) << SK_G32_SHIFT) |
@@ -641,7 +641,7 @@ static SkPMColor SkCompact_8888(uint32_t c)
but this routine just keeps the high 4bits of each component in the low
4bits of the result (just like a newly expanded PMColor16).
*/
-static uint32_t SkExpand32_4444(SkPMColor c)
+static inline uint32_t SkExpand32_4444(SkPMColor c)
{
return (((c >> (SK_R32_SHIFT + 4)) & 0xF) << 24) |
(((c >> (SK_G32_SHIFT + 4)) & 0xF) << 8) |
diff --git a/skia/include/corecg/SkMath.h b/skia/include/corecg/SkMath.h
index 7519dee..d9fb274 100644
--- a/skia/include/corecg/SkMath.h
+++ b/skia/include/corecg/SkMath.h
@@ -209,7 +209,7 @@ static inline U8CPU SkMulDiv255Round(U8CPU a, U8CPU b) {
/** Return a*b/((1 << shift) - 1), rounding any fractional bits.
Only valid if a and b are unsigned and <= 32767 and shift is > 0 and <= 8
*/
-static unsigned SkMul16ShiftRound(unsigned a, unsigned b, int shift) {
+static inline unsigned SkMul16ShiftRound(unsigned a, unsigned b, int shift) {
SkASSERT(a <= 32767);
SkASSERT(b <= 32767);
SkASSERT(shift > 0 && shift <= 8);
diff --git a/skia/picture/SkPictureFlat.h b/skia/picture/SkPictureFlat.h
index b4ce899..64a7359 100644
--- a/skia/picture/SkPictureFlat.h
+++ b/skia/picture/SkPictureFlat.h
@@ -48,7 +48,7 @@ enum DrawVertexFlags {
class SkRefCntPlayback {
public:
SkRefCntPlayback();
- ~SkRefCntPlayback();
+ virtual ~SkRefCntPlayback();
int count() const { return fCount; }
diff --git a/skia/sgl/SkGeometry.cpp b/skia/sgl/SkGeometry.cpp
index 65022ce..3c72f4b 100644
--- a/skia/sgl/SkGeometry.cpp
+++ b/skia/sgl/SkGeometry.cpp
@@ -260,14 +260,6 @@ static void flatten_double_quad_extrema(SkScalar coords[14])
coords[2] = coords[6] = coords[4];
}
-static void force_quad_monotonic_in_y(SkPoint pts[3])
-{
- // zap pts[1].fY to the nearest value
- SkScalar ab = SkScalarAbs(pts[0].fY - pts[1].fY);
- SkScalar bc = SkScalarAbs(pts[1].fY - pts[2].fY);
- pts[1].fY = ab < bc ? pts[0].fY : pts[2].fY;
-}
-
/* Returns 0 for 1 quad, and 1 for two quads, either way the answer is
stored in dst[]. Guarantees that the 1/2 quads will be monotonic.
*/
diff --git a/skia/sgl/SkPaint.cpp b/skia/sgl/SkPaint.cpp
index 71aa230..ef23f09 100644
--- a/skia/sgl/SkPaint.cpp
+++ b/skia/sgl/SkPaint.cpp
@@ -374,26 +374,6 @@ int SkPaint::textToGlyphs(const void* textData, size_t byteLength, uint16_t glyp
//////////////////////////////////////////////////////////////////////////////
-static uint32_t sk_glyphID_next(const char** text)
-{
- const uint16_t* glyph = (const uint16_t*)text;
- int32_t value = *glyph;
- glyph += 1;
- *text = (const char*)glyph;
- return value;
-}
-
-static uint32_t sk_glyphID_prev(const char** text)
-{
- const uint16_t* glyph = (const uint16_t*)text;
- glyph -= 1;
- int32_t value = *glyph;
- *text = (const char*)glyph;
- return value;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
static const SkGlyph& sk_getMetrics_utf8_next(SkGlyphCache* cache, const char** text)
{
SkASSERT(cache != NULL);
diff --git a/skia/sgl/SkScalerContext.cpp b/skia/sgl/SkScalerContext.cpp
index 5f4abfd..0289312 100644
--- a/skia/sgl/SkScalerContext.cpp
+++ b/skia/sgl/SkScalerContext.cpp
@@ -182,17 +182,6 @@ SkScalerContext* SkScalerContext::getGlyphContext(const SkGlyph& glyph) const {
return ctx;
}
-static int plus_minus_pin(int value, int max) {
- SkASSERT(max >= 0);
-
- if (value > max) {
- value = max;
- } else if (value < -max) {
- value = -max;
- }
- return value;
-}
-
void SkScalerContext::getAdvance(SkGlyph* glyph) {
// mark us as just having a valid advance
glyph->fMaskFormat = MASK_FORMAT_JUST_ADVANCE;
diff --git a/skia/sgl/SkScan.h b/skia/sgl/SkScan.h
index c4cefeb..f5b12fb 100644
--- a/skia/sgl/SkScan.h
+++ b/skia/sgl/SkScan.h
@@ -83,7 +83,7 @@ public:
from int to SkFixed. Does not check for overflow if the src coordinates
exceed 32K
*/
-static void XRect_set(SkXRect* xr, const SkIRect& src) {
+static inline void XRect_set(SkXRect* xr, const SkIRect& src) {
xr->fLeft = SkIntToFixed(src.fLeft);
xr->fTop = SkIntToFixed(src.fTop);
xr->fRight = SkIntToFixed(src.fRight);
@@ -94,7 +94,7 @@ static void XRect_set(SkXRect* xr, const SkIRect& src) {
from SkScalar to SkFixed. Does not check for overflow if the src coordinates
exceed 32K
*/
-static void XRect_set(SkXRect* xr, const SkRect& src) {
+static inline void XRect_set(SkXRect* xr, const SkRect& src) {
xr->fLeft = SkScalarToFixed(src.fLeft);
xr->fTop = SkScalarToFixed(src.fTop);
xr->fRight = SkScalarToFixed(src.fRight);
@@ -103,7 +103,7 @@ static void XRect_set(SkXRect* xr, const SkRect& src) {
/** Round the SkXRect coordinates, and store the result in the SkIRect.
*/
-static void XRect_round(const SkXRect& xr, SkIRect* dst) {
+static inline void XRect_round(const SkXRect& xr, SkIRect* dst) {
dst->fLeft = SkFixedRound(xr.fLeft);
dst->fTop = SkFixedRound(xr.fTop);
dst->fRight = SkFixedRound(xr.fRight);
@@ -113,7 +113,7 @@ static void XRect_round(const SkXRect& xr, SkIRect* dst) {
/** Round the SkXRect coordinates out (i.e. use floor for left/top, and ceiling
for right/bottom), and store the result in the SkIRect.
*/
-static void XRect_roundOut(const SkXRect& xr, SkIRect* dst) {
+static inline void XRect_roundOut(const SkXRect& xr, SkIRect* dst) {
dst->fLeft = SkFixedFloor(xr.fLeft);
dst->fTop = SkFixedFloor(xr.fTop);
dst->fRight = SkFixedCeil(xr.fRight);
diff --git a/skia/sgl/SkScan_Path.cpp b/skia/sgl/SkScan_Path.cpp
index 4e58518..43a61bd 100644
--- a/skia/sgl/SkScan_Path.cpp
+++ b/skia/sgl/SkScan_Path.cpp
@@ -387,6 +387,7 @@ static SkEdge* sort_edges(SkEdge* list[], int count, SkEdge** last)
return list[0];
}
+#ifdef SK_DEBUG
/* 'quick' computation of the max sized needed to allocated for
our edgelist.
*/
@@ -422,6 +423,7 @@ static int worst_case_edge_count(const SkPath& path, size_t* storage)
*storage = size;
return edgeCount;
}
+#endif
/* Much faster than worst_case_edge_count, but over estimates even more
*/
diff --git a/skia/sgl/SkUtils.cpp b/skia/sgl/SkUtils.cpp
index d541a1d..94834fd 100644
--- a/skia/sgl/SkUtils.cpp
+++ b/skia/sgl/SkUtils.cpp
@@ -427,10 +427,12 @@ size_t SkUTF16_ToUTF8(const uint16_t utf16[], int numberOf16BitValues, char utf8
#include <stdlib.h>
+#if 0
static int round_to_K(size_t bytes)
{
return (bytes + 512) >> 10;
}
+#endif
SkAutoMemoryUsageProbe::SkAutoMemoryUsageProbe(const char label[])
: fLabel(label)
diff --git a/skia/sgl/SkWriter32.cpp b/skia/sgl/SkWriter32.cpp
index 61d0051..819803f 100644
--- a/skia/sgl/SkWriter32.cpp
+++ b/skia/sgl/SkWriter32.cpp
@@ -37,15 +37,6 @@ struct SkWriter32::Block {
}
};
-static size_t compute_block_size(size_t currSize, size_t minSize)
-{
- if (currSize < minSize)
- currSize = minSize;
-
- currSize += (currSize >> 1);
- return SkAlign4(currSize);
-}
-
///////////////////////////////////////////////////////////////////////////////
SkWriter32::~SkWriter32()