aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2011-06-23 17:32:30 -0400
committerDerek Sollenberger <djsollen@google.com>2011-06-23 17:32:30 -0400
commit0199fa7423f89a129da2b22a488f2c18e2e4727f (patch)
treea831057e846066083c5bab3fb014313678ad1cac /include
parent4eb5f622ae8a529cdf2a2fe6347e6bd97b5f28cb (diff)
downloadexternal_skia-0199fa7423f89a129da2b22a488f2c18e2e4727f.zip
external_skia-0199fa7423f89a129da2b22a488f2c18e2e4727f.tar.gz
external_skia-0199fa7423f89a129da2b22a488f2c18e2e4727f.tar.bz2
Skia Merge (revision 1562)
Change-Id: Ief005abc9eb741ccf5efec3d1f29fe2dfc23103d
Diffstat (limited to 'include')
-rw-r--r--include/core/SkDrawFilter.h2
-rw-r--r--include/core/SkFixed.h3
-rw-r--r--include/core/SkFontHost.h24
-rw-r--r--include/core/SkScalar.h2
-rw-r--r--include/core/SkScalerContext.h1
-rw-r--r--include/effects/SkLayerDrawLooper.h4
-rw-r--r--include/views/SkOSWindow_Unix.h2
7 files changed, 24 insertions, 14 deletions
diff --git a/include/core/SkDrawFilter.h b/include/core/SkDrawFilter.h
index 1434391..c8af187 100644
--- a/include/core/SkDrawFilter.h
+++ b/include/core/SkDrawFilter.h
@@ -44,7 +44,7 @@ public:
* Called with the paint that will be used to draw the specified type.
* The implementation may modify the paint as they wish.
*/
- virtual void filter(SkPaint*, Type) {}
+ virtual void filter(SkPaint*, Type) = 0;
};
#endif
diff --git a/include/core/SkFixed.h b/include/core/SkFixed.h
index c58c6de..8b56c50 100644
--- a/include/core/SkFixed.h
+++ b/include/core/SkFixed.h
@@ -111,6 +111,9 @@ inline SkFixed SkFixedFraction(SkFixed x)
#define SkFixedAbs(x) SkAbs32(x)
#define SkFixedAve(a, b) (((a) + (b)) >> 1)
+// The same as SkIntToFixed(SkFixedFloor(x))
+#define SkFixedFloorToFixed(x) ((x) & ~0xFFFF)
+
SkFixed SkFixedMul_portable(SkFixed, SkFixed);
SkFract SkFractMul_portable(SkFract, SkFract);
inline SkFixed SkFixedSquare_portable(SkFixed value)
diff --git a/include/core/SkFontHost.h b/include/core/SkFontHost.h
index d0f7c65..e20ea05 100644
--- a/include/core/SkFontHost.h
+++ b/include/core/SkFontHost.h
@@ -150,14 +150,22 @@ public:
*/
static SkScalerContext* CreateScalerContext(const SkDescriptor* desc);
- /** Given a "current" fontID, return the next logical fontID to use
- when searching fonts for a given unicode value. Typically the caller
- will query a given font, and if a unicode value is not supported, they
- will call this, and if 0 is not returned, will search that font, and so
- on. This process must be finite, and when the fonthost sees a
- font with no logical successor, it must return 0.
- */
- static uint32_t NextLogicalFont(SkFontID fontID);
+ /**
+ * Given a "current" fontID, return the next logical fontID to use
+ * when searching fonts for a given unicode value. Typically the caller
+ * will query a given font, and if a unicode value is not supported, they
+ * will call this, and if 0 is not returned, will search that font, and so
+ * on. This process must be finite, and when the fonthost sees a
+ * font with no logical successor, it must return 0.
+ *
+ * The original fontID is also provided. This is the initial font that was
+ * stored in the typeface of the caller. It is provided as an aid to choose
+ * the best next logical font. e.g. If the original font was bold or serif,
+ * but the 2nd in the logical chain was plain, then a subsequent call to
+ * get the 3rd can still inspect the original, and try to match its
+ * stylistic attributes.
+ */
+ static SkFontID NextLogicalFont(SkFontID currFontID, SkFontID origFontID);
///////////////////////////////////////////////////////////////////////////
diff --git a/include/core/SkScalar.h b/include/core/SkScalar.h
index 5dbf684..ba113f4 100644
--- a/include/core/SkScalar.h
+++ b/include/core/SkScalar.h
@@ -18,6 +18,7 @@
#define SkScalar_DEFINED
#include "SkFixed.h"
+#include "SkFloatingPoint.h"
/** \file SkScalar.h
@@ -29,7 +30,6 @@
*/
#ifdef SK_SCALAR_IS_FLOAT
- #include "SkFloatingPoint.h"
/** SkScalar is our type for fractional values and coordinates. Depending on
compile configurations, it is either represented as an IEEE float, or
diff --git a/include/core/SkScalerContext.h b/include/core/SkScalerContext.h
index 3f818a3..cbbbdf0 100644
--- a/include/core/SkScalerContext.h
+++ b/include/core/SkScalerContext.h
@@ -189,6 +189,7 @@ private:
};
public:
struct Rec {
+ uint32_t fOrigFontID;
uint32_t fFontID;
SkScalar fTextSize, fPreScaleX, fPreSkewX;
SkScalar fPost2x2[2][2];
diff --git a/include/effects/SkLayerDrawLooper.h b/include/effects/SkLayerDrawLooper.h
index acc4f9b..8627ae4 100644
--- a/include/effects/SkLayerDrawLooper.h
+++ b/include/effects/SkLayerDrawLooper.h
@@ -74,12 +74,12 @@ public:
/**
* This layer will draw with the original paint, ad the specified offset
*/
- SkPaint* addLayer(SkScalar dx, SkScalar dy);
+ void addLayer(SkScalar dx, SkScalar dy);
/**
* This layer will with the original paint and no offset.
*/
- SkPaint* addLayer() { return this->addLayer(0, 0); }
+ void addLayer() { this->addLayer(0, 0); }
// overrides from SkDrawLooper
virtual void init(SkCanvas*);
diff --git a/include/views/SkOSWindow_Unix.h b/include/views/SkOSWindow_Unix.h
index 803ca13..45b53d5 100644
--- a/include/views/SkOSWindow_Unix.h
+++ b/include/views/SkOSWindow_Unix.h
@@ -63,13 +63,11 @@ protected:
private:
SkUnixWindow fUnixWindow;
bool fGLAttached;
- bool fRestart;
// Needed for GL
XVisualInfo* fVi;
void doPaint();
- void restartLoop();
void mapWindowAndWait();
typedef SkWindow INHERITED;