aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-12-18 13:29:54 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-18 13:29:54 -0800
commit8aacf2085673f6302a43d590d4d2890789b87192 (patch)
treeee82bfd1b0289e9f715ec86c7aed8e413c4e4de0 /include
parent152d42f628335b747c7b527cedbb69fe2dc3d3ee (diff)
Fill SkRRect::fType proactively.
Diffstat (limited to 'include')
-rw-r--r--include/core/SkRRect.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/include/core/SkRRect.h b/include/core/SkRRect.h
index f27d798bd4..b9c3a79763 100644
--- a/include/core/SkRRect.h
+++ b/include/core/SkRRect.h
@@ -52,9 +52,6 @@ public:
* by type(). The subtypes become progressively less restrictive.
*/
enum Type {
- // !< Internal indicator that the sub type must be computed.
- kUnknown_Type = -1,
-
// !< The RR is empty
kEmpty_Type,
@@ -90,11 +87,6 @@ public:
*/
Type getType() const {
SkDEBUGCODE(this->validate();)
-
- if (kUnknown_Type == fType) {
- this->computeType();
- }
- SkASSERT(kUnknown_Type != fType);
return static_cast<Type>(fType);
}
@@ -301,11 +293,11 @@ private:
// Radii order is UL, UR, LR, LL. Use Corner enum to index into fRadii[]
SkVector fRadii[4];
// use an explicitly sized type so we're sure the class is dense (no uninitialized bytes)
- mutable int32_t fType;
+ int32_t fType;
// TODO: add padding so we can use memcpy for flattening and not copy
// uninitialized data
- void computeType() const;
+ void computeType();
bool checkCornerContainment(SkScalar x, SkScalar y) const;
// to access fRadii directly