aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-02 13:50:38 +0000
committerGravatar rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-02 13:50:38 +0000
commitd6bab0238655dbab24dfe92bd0b16b464310a8c7 (patch)
tree664de29dd3b91a1ed1be463f2cd797e871cabec7 /include
parent5b39f5ba9c339d1e4dae391fee9ec1396feec180 (diff)
Reverting r12427
git-svn-id: http://skia.googlecode.com/svn/trunk@12428 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r--include/core/SkBitmap.h22
-rw-r--r--include/core/SkImageDecoder.h2
-rw-r--r--include/core/SkPicture.h3
-rw-r--r--include/core/SkString.h4
-rw-r--r--include/effects/SkDropShadowImageFilter.h3
-rw-r--r--include/ports/SkFontMgr.h1
6 files changed, 9 insertions, 26 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index b58925c9db..cd85b6a9b1 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -42,12 +42,6 @@ public:
enum Config {
kNo_Config, //!< bitmap has not been configured
- /**
- * 1-bit per pixel, (0 is transparent, 1 is opaque)
- * Valid as a destination (target of a canvas), but not valid as a src.
- * i.e. you can draw into a 1-bit bitmap, but you cannot draw from one.
- */
- kA1_Config,
kA8_Config, //!< 8-bits per pixel, with only alpha specified (0 is transparent, 0xFF is opaque)
kIndex8_Config, //!< 8-bits per pixel, using SkColorTable to specify the colors
kRGB_565_Config, //!< 16-bits per pixel, (see SkColorPriv.h for packing)
@@ -489,14 +483,6 @@ public:
*/
inline uint8_t* getAddr8(int x, int y) const;
- /** Returns the address of the byte containing the pixel specified by x,y
- * for 1bit pixels.
- * In debug build, this asserts that the pixels are allocated and locked,
- * and that the config is 1-bit, however none of these checks are performed
- * in the release build.
- */
- inline uint8_t* getAddr1(int x, int y) const;
-
/** Returns the color corresponding to the pixel specified by x,y for
* colortable based bitmaps.
* In debug build, this asserts that the pixels are allocated and locked,
@@ -818,12 +804,4 @@ inline SkPMColor SkBitmap::getIndex8Color(int x, int y) const {
return (*fColorTable)[*((const uint8_t*)fPixels + y * fRowBytes + x)];
}
-// returns the address of the byte that contains the x coordinate
-inline uint8_t* SkBitmap::getAddr1(int x, int y) const {
- SkASSERT(fPixels);
- SkASSERT(fConfig == kA1_Config);
- SkASSERT((unsigned)x < fWidth && (unsigned)y < fHeight);
- return (uint8_t*)fPixels + y * fRowBytes + (x >> 3);
-}
-
#endif
diff --git a/include/core/SkImageDecoder.h b/include/core/SkImageDecoder.h
index a7e3646553..5745dbd5ba 100644
--- a/include/core/SkImageDecoder.h
+++ b/include/core/SkImageDecoder.h
@@ -186,7 +186,7 @@ public:
src: 32/24, no-alpha -> 4
src: 32/24, yes-alpha -> 5
*/
- void setPrefConfigTable(const SkBitmap::Config pref[6]);
+ void setPrefConfigTable(const SkBitmap::Config pref[5]);
/**
* Optional table describing the caller's preferred config based on
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index e371c4369d..42566eddbd 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -218,13 +218,14 @@ protected:
// V13: add flag to drawBitmapRectToRect
// parameterize blurs by sigma rather than radius
// V14: Add flags word to PathRef serialization
+ // V15: Remove A1 bitmpa config (and renumber remaining configs)
#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TOO
static const uint32_t PRIOR_PRIOR_PICTURE_VERSION = 12; // TODO: remove when .skps regenerated
#endif
#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V14_AND_ALL_OTHER_INSTANCES_TOO
static const uint32_t PRIOR_PICTURE_VERSION2 = 13; // TODO: remove when .skps regenerated
#endif
- static const uint32_t PICTURE_VERSION = 14;
+ static const uint32_t PICTURE_VERSION = 15;
// fPlayback, fRecord, fWidth & fHeight are protected to allow derived classes to
// install their own SkPicturePlayback-derived players,SkPictureRecord-derived
diff --git a/include/core/SkString.h b/include/core/SkString.h
index 291bd65696..ce87312f12 100644
--- a/include/core/SkString.h
+++ b/include/core/SkString.h
@@ -11,6 +11,7 @@
#define SkString_DEFINED
#include "SkScalar.h"
+#include "SkTArray.h"
#include <stdarg.h>
@@ -244,4 +245,7 @@ template <> inline void SkTSwap(SkString& a, SkString& b) {
a.swap(b);
}
+// Split str on any characters in delimiters into out. (Think, strtok with a sane API.)
+void SkStrSplit(const char* str, const char* delimiters, SkTArray<SkString>* out);
+
#endif
diff --git a/include/effects/SkDropShadowImageFilter.h b/include/effects/SkDropShadowImageFilter.h
index 501df7cf7f..5a58a0a06a 100644
--- a/include/effects/SkDropShadowImageFilter.h
+++ b/include/effects/SkDropShadowImageFilter.h
@@ -12,6 +12,7 @@
class SK_API SkDropShadowImageFilter : public SkImageFilter {
public:
SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigma, SkColor, SkImageFilter* input = NULL);
+ SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor, SkImageFilter* input = NULL, const CropRect* cropRect = NULL);
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDropShadowImageFilter)
protected:
@@ -20,7 +21,7 @@ protected:
virtual bool onFilterImage(Proxy*, const SkBitmap& source, const SkMatrix&, SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
private:
- SkScalar fDx, fDy, fSigma;
+ SkScalar fDx, fDy, fSigmaX, fSigmaY;
SkColor fColor;
typedef SkImageFilter INHERITED;
};
diff --git a/include/ports/SkFontMgr.h b/include/ports/SkFontMgr.h
index accb0c5860..97ae2f15be 100644
--- a/include/ports/SkFontMgr.h
+++ b/include/ports/SkFontMgr.h
@@ -105,7 +105,6 @@ protected:
virtual SkTypeface* onCreateFromStream(SkStream*, int ttcIndex) = 0;
virtual SkTypeface* onCreateFromFile(const char path[], int ttcIndex) = 0;
- // TODO: make this pure-virtual once all ports know about it
virtual SkTypeface* onLegacyCreateTypeface(const char familyName[],
unsigned styleBits) = 0;
private: