aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-12 19:15:31 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-12 19:15:31 +0000
commit25c1408c3da9ca90509b84f21a1161ef40052bd1 (patch)
tree4455a49c8761c38b489ab5dd2733d9066ef503de /include/core
parent9b0fd9aa663612c983e4dfa1323cecda6e1e9029 (diff)
revert 6762-6763, since those require new skps to be generated, and we can't
do that immediately right now... will re-submit when we can. git-svn-id: http://skia.googlecode.com/svn/trunk@6766 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkCanvas.h47
-rw-r--r--include/core/SkPath.h6
-rw-r--r--include/core/SkPicture.h3
-rw-r--r--include/core/SkRRect.h43
-rw-r--r--include/core/SkReader32.h6
-rw-r--r--include/core/SkWriter32.h7
6 files changed, 14 insertions, 98 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 3b3dbc4224..5bbfc74a9a 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -27,7 +27,6 @@ class SkDraw;
class SkDrawFilter;
class SkMetaData;
class SkPicture;
-class SkRRect;
class SkSurface_Base;
/** \class SkCanvas
@@ -340,35 +339,20 @@ public:
*/
void resetMatrix();
- /**
- * Modify the current clip with the specified rectangle.
- * @param rect The rect to combine with the current clip
- * @param op The region op to apply to the current clip
- * @param doAntiAlias true if the clip should be antialiased
- * @return true if the canvas' clip is non-empty
- */
+ /** Modify the current clip with the specified rectangle.
+ @param rect The rect to intersect with the current clip
+ @param op The region op to apply to the current clip
+ @return true if the canvas' clip is non-empty
+ */
virtual bool clipRect(const SkRect& rect,
SkRegion::Op op = SkRegion::kIntersect_Op,
bool doAntiAlias = false);
- /**
- * Modify the current clip with the specified SkRRect.
- * @param rrect The rrect to combine with the current clip
- * @param op The region op to apply to the current clip
- * @param doAntiAlias true if the clip should be antialiased
- * @return true if the canvas' clip is non-empty
- */
- virtual bool clipRRect(const SkRRect& rrect,
- SkRegion::Op op = SkRegion::kIntersect_Op,
- bool doAntiAlias = false);
-
- /**
- * Modify the current clip with the specified path.
- * @param path The path to combine with the current clip
- * @param op The region op to apply to the current clip
- * @param doAntiAlias true if the clip should be antialiased
- * @return true if the canvas' new clip is non-empty
- */
+ /** Modify the current clip with the specified path.
+ @param path The path to apply to the current clip
+ @param op The region op to apply to the current clip
+ @return true if the canvas' new clip is non-empty
+ */
virtual bool clipPath(const SkPath& path,
SkRegion::Op op = SkRegion::kIntersect_Op,
bool doAntiAlias = false);
@@ -593,16 +577,7 @@ public:
@param oval The rectangle bounds of the oval to be drawn
@param paint The paint used to draw the oval
*/
- virtual void drawOval(const SkRect& oval, const SkPaint&);
-
- /**
- * Draw the specified RRect using the specified paint The rrect will be filled or stroked
- * based on the Style in the paint.
- *
- * @param rrect The round-rect to draw
- * @param paint The paint used to draw the round-rect
- */
- virtual void drawRRect(const SkRRect& rrect, const SkPaint& paint);
+ void drawOval(const SkRect& oval, const SkPaint&);
/** Draw the specified circle using the specified paint. If radius is <= 0,
then nothing will be drawn. The circle will be filled
diff --git a/include/core/SkPath.h b/include/core/SkPath.h
index 98d775222b..b85e827331 100644
--- a/include/core/SkPath.h
+++ b/include/core/SkPath.h
@@ -28,7 +28,6 @@ class SkWriter32;
class SkAutoPathBoundsUpdate;
class SkString;
class SkPathRef;
-class SkRRect;
#ifndef SK_DEBUG_PATH_REF
#define SK_DEBUG_PATH_REF 0
@@ -657,11 +656,6 @@ public:
Direction dir = kCW_Direction);
/**
- * Add a SkRRect contour to the path
- */
- void addRRect(const SkRRect&, Direction dir = kCW_Direction);
-
- /**
* Add a new contour made of just lines. This is just a fast version of
* the following:
* this->moveTo(pts[0]);
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index 3525695d02..b51b6aad5e 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -158,8 +158,7 @@ protected:
// V8 : Add an option for encoding bitmaps
// V9 : Allow the reader and writer of an SKP disagree on whether to support
// SK_SUPPORT_HINTING_SCALE_FACTOR
- // V10: add drawRRect, drawOval, clipRRect
- static const uint32_t PICTURE_VERSION = 10;
+ static const uint32_t PICTURE_VERSION = 9;
// fPlayback, fRecord, fWidth & fHeight are protected to allow derived classes to
// install their own SkPicturePlayback-derived players,SkPictureRecord-derived
diff --git a/include/core/SkRRect.h b/include/core/SkRRect.h
index a900d4a2e5..1b52da965c 100644
--- a/include/core/SkRRect.h
+++ b/include/core/SkRRect.h
@@ -11,8 +11,6 @@
#include "SkRect.h"
#include "SkPoint.h"
-class SkPath;
-
// Path forward:
// core work
// add validate method (all radii positive, all radii sums < rect size, etc.)
@@ -85,7 +83,7 @@ public:
/**
* Returns the RR's sub type.
*/
- Type getType() const {
+ Type type() const {
SkDEBUGCODE(this->validate();)
if (kUnknown_Type == fType) {
@@ -95,14 +93,6 @@ public:
return fType;
}
- Type type() const { return this->getType(); }
-
- inline bool isEmpty() const { return kEmpty_Type == this->getType(); }
- inline bool isRect() const { return kRect_Type == this->getType(); }
- inline bool isOval() const { return kOval_Type == this->getType(); }
- inline bool isSimple() const { return kSimple_Type == this->getType(); }
- inline bool isComplex() const { return kComplex_Type == this->getType(); }
-
/**
* Set this RR to the empty rectangle (0,0,0,0) with 0 x & y radii.
*/
@@ -172,16 +162,6 @@ public:
const SkRect& rect() const { return fRect; }
const SkVector& radii(Corner corner) const { return fRadii[corner]; }
- const SkRect& getBounds() const { return fRect; }
-
- /**
- * When a rrect is simple, all of its radii are equal. This returns one
- * of those radii. This call requires the rrect to be non-complex.
- */
- const SkVector& getSimpleRadii() const {
- SkASSERT(!this->isComplex());
- return fRadii[0];
- }
friend bool operator==(const SkRRect& a, const SkRRect& b) {
return a.fRect == b.fRect &&
@@ -219,24 +199,6 @@ public:
SkDEBUGCODE(void validate() const;)
- enum {
- kSizeInMemory = 12 * sizeof(SkScalar)
- };
-
- /**
- * Write the rrect into the specified buffer. This is guaranteed to always
- * write kSizeInMemory bytes, and that value is guaranteed to always be
- * a multiple of 4. Return kSizeInMemory.
- */
- uint32_t writeToMemory(void* buffer) const;
-
- /**
- * Read the rrect from the specified buffer. This is guaranteed to always
- * read kSizeInMemory bytes, and that value is guaranteed to always be
- * a multiple of 4. Return kSizeInMemory.
- */
- uint32_t readFromMemory(const void* buffer);
-
private:
SkRect fRect;
// Radii order is UL, UR, LR, LL. Use Corner enum to index into fRadii[]
@@ -246,9 +208,6 @@ private:
// uninitialized data
void computeType() const;
-
- // to access fRadii directly
- friend class SkPath;
};
#endif
diff --git a/include/core/SkReader32.h b/include/core/SkReader32.h
index 7a8d22a80c..4f6809fd9e 100644
--- a/include/core/SkReader32.h
+++ b/include/core/SkReader32.h
@@ -13,7 +13,6 @@
#include "SkMatrix.h"
#include "SkPath.h"
#include "SkRegion.h"
-#include "SkRRect.h"
#include "SkScalar.h"
class SkString;
@@ -118,11 +117,6 @@ public:
(void)this->skip(size);
}
- SkRRect* readRRect(SkRRect* rrect) {
- rrect->readFromMemory(this->skip(SkRRect::kSizeInMemory));
- return rrect;
- }
-
void readRegion(SkRegion* rgn) {
size_t size = rgn->readFromMemory(this->peek());
SkASSERT(SkAlign4(size) == size);
diff --git a/include/core/SkWriter32.h b/include/core/SkWriter32.h
index 9368126f4e..3b9bdfca8f 100644
--- a/include/core/SkWriter32.h
+++ b/include/core/SkWriter32.h
@@ -16,7 +16,6 @@
#include "SkPath.h"
#include "SkPoint.h"
#include "SkRect.h"
-#include "SkRRect.h"
#include "SkMatrix.h"
#include "SkRegion.h"
@@ -109,11 +108,7 @@ public:
void writeRect(const SkRect& rect) {
*(SkRect*)this->reserve(sizeof(rect)) = rect;
}
-
- void writeRRect(const SkRRect& rrect) {
- rrect.writeToMemory(this->reserve(SkRRect::kSizeInMemory));
- }
-
+
void writePath(const SkPath& path) {
size_t size = path.writeToMemory(NULL);
SkASSERT(SkAlign4(size) == size);