aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/animator/SkAnimator.h130
-rw-r--r--include/config/SkUserConfig.h2
-rw-r--r--include/core/Sk64.h20
-rw-r--r--include/core/SkAnnotation.h2
-rw-r--r--include/core/SkBitmap.h10
-rw-r--r--include/core/SkBounder.h4
-rw-r--r--include/core/SkChecksum.h12
-rw-r--r--include/core/SkChunkAlloc.h6
-rw-r--r--include/core/SkClipStack.h38
-rw-r--r--include/core/SkColorFilter.h2
-rw-r--r--include/core/SkColorPriv.h36
-rw-r--r--include/core/SkComposeShader.h2
-rw-r--r--include/core/SkData.h10
-rw-r--r--include/core/SkDataSet.h2
-rw-r--r--include/core/SkDeque.h14
-rw-r--r--include/core/SkDevice.h8
-rw-r--r--include/core/SkDither.h22
-rw-r--r--include/core/SkDrawFilter.h2
-rw-r--r--include/core/SkDrawLooper.h2
-rw-r--r--include/core/SkFlate.h6
-rw-r--r--include/core/SkFlattenable.h8
-rw-r--r--include/core/SkGraphics.h12
-rw-r--r--include/core/SkImage.h8
-rw-r--r--include/core/SkImageFilter.h4
-rw-r--r--include/core/SkInstCnt.h2
-rw-r--r--include/core/SkLineClipper.h4
-rw-r--r--include/core/SkMMapStream.h4
-rw-r--r--include/core/SkMallocPixelRef.h2
-rw-r--r--include/core/SkMask.h2
-rw-r--r--include/core/SkMatrix.h32
-rw-r--r--include/core/SkOSFile.h2
-rw-r--r--include/core/SkPaint.h22
-rw-r--r--include/core/SkPath.h52
-rw-r--r--include/core/SkPathEffect.h6
-rw-r--r--include/core/SkPathMeasure.h4
-rw-r--r--include/core/SkPicture.h14
-rw-r--r--include/core/SkPixelRef.h2
-rw-r--r--include/core/SkPoint.h10
-rw-r--r--include/core/SkPreConfig.h2
-rw-r--r--include/core/SkReader32.h18
-rw-r--r--include/core/SkRect.h56
-rw-r--r--include/core/SkRegion.h28
-rw-r--r--include/core/SkShader.h2
-rw-r--r--include/core/SkSize.h16
-rw-r--r--include/core/SkStream.h16
-rw-r--r--include/core/SkSurface.h4
-rw-r--r--include/core/SkTArray.h6
-rw-r--r--include/core/SkTDArray.h6
-rw-r--r--include/core/SkTDLinkedList.h6
-rw-r--r--include/core/SkTLazy.h4
-rw-r--r--include/core/SkTSearch.h2
-rw-r--r--include/core/SkTemplates.h12
-rw-r--r--include/core/SkThread.h4
-rw-r--r--include/core/SkTypeface.h10
-rw-r--r--include/core/SkTypes.h2
-rw-r--r--include/core/SkUnPreMultiply.h14
-rw-r--r--include/core/SkUnitMapper.h2
-rw-r--r--include/core/SkWriter32.h26
-rw-r--r--include/core/SkXfermode.h8
-rw-r--r--include/effects/Sk1DPathEffect.h6
-rw-r--r--include/effects/Sk2DPathEffect.h2
-rw-r--r--include/effects/SkBlurDrawLooper.h10
-rw-r--r--include/effects/SkBlurMaskFilter.h2
-rwxr-xr-xinclude/effects/SkColorFilterImageFilter.h8
-rw-r--r--include/effects/SkColorMatrix.h2
-rw-r--r--include/effects/SkCornerPathEffect.h2
-rw-r--r--include/effects/SkDashPathEffect.h4
-rw-r--r--include/effects/SkDiscretePathEffect.h2
-rw-r--r--include/effects/SkEmbossMaskFilter.h2
-rw-r--r--include/effects/SkGradientShader.h4
-rw-r--r--include/effects/SkKernel33MaskFilter.h12
-rw-r--r--include/effects/SkLayerDrawLooper.h14
-rw-r--r--include/effects/SkLayerRasterizer.h12
-rw-r--r--include/effects/SkPaintFlagsDrawFilter.h4
-rw-r--r--include/effects/SkPorterDuff.h6
-rw-r--r--include/effects/SkTableColorFilter.h2
-rw-r--r--include/effects/SkTableMaskFilter.h6
-rwxr-xr-xinclude/effects/SkTestImageFilters.h28
-rw-r--r--include/effects/SkTransparentShader.h2
-rw-r--r--include/gpu/GrAARectRenderer.h2
-rw-r--r--include/gpu/GrCacheID.h18
-rw-r--r--include/gpu/GrClipData.h10
-rw-r--r--include/gpu/GrConfig.h2
-rw-r--r--include/gpu/GrContext.h24
-rw-r--r--include/gpu/GrContextFactory.h2
-rw-r--r--include/gpu/GrCustomStage.h4
-rw-r--r--include/gpu/GrGlyph.h14
-rw-r--r--include/gpu/GrPaint.h2
-rw-r--r--include/gpu/GrPoint.h2
-rw-r--r--include/gpu/GrRect.h4
-rw-r--r--include/gpu/GrRenderTarget.h8
-rw-r--r--include/gpu/GrSamplerState.h4
-rw-r--r--include/gpu/GrTexture.h26
-rw-r--r--include/gpu/GrTypes.h16
-rw-r--r--include/gpu/gl/GrGLConfig.h2
-rw-r--r--include/gpu/gl/GrGLFunctions.h4
-rw-r--r--include/gpu/gl/GrGLInterface.h8
-rw-r--r--include/gpu/gl/SkGLContext.h4
-rw-r--r--include/images/SkFlipPixelRef.h10
-rw-r--r--include/images/SkImageEncoder.h2
-rw-r--r--include/images/SkImageRef.h22
-rw-r--r--include/images/SkImageRef_GlobalPool.h14
-rw-r--r--include/images/SkMovie.h6
-rw-r--r--include/images/SkPageFlipper.h4
-rw-r--r--include/ports/SkHarfBuzzFont.h2
-rw-r--r--include/ports/SkStream_Win.h2
-rw-r--r--include/svg/SkSVGBase.h2
-rw-r--r--include/svg/SkSVGPaintState.h4
-rw-r--r--include/svg/SkSVGParser.h2
-rw-r--r--include/svg/SkSVGTypes.h2
-rw-r--r--include/text/SkTextLayout.h2
-rw-r--r--include/utils/SkBoundaryPatch.h4
-rw-r--r--include/utils/SkCamera.h8
-rw-r--r--include/utils/SkCullPoints.h10
-rw-r--r--include/utils/SkDeferredCanvas.h8
-rw-r--r--include/utils/SkDumpCanvas.h2
-rw-r--r--include/utils/SkJSON.h50
-rw-r--r--include/utils/SkMeshUtils.h2
-rw-r--r--include/utils/SkNinePatch.h2
-rwxr-xr-xinclude/utils/ios/SkStream_NSData.h2
-rw-r--r--include/utils/win/SkIStream.h12
-rw-r--r--include/utils/win/SkTScopedComPtr.h4
-rw-r--r--include/views/SkEvent.h6
-rw-r--r--include/views/SkKey.h6
-rw-r--r--include/views/SkOSMenu.h76
-rw-r--r--include/views/SkOSWindow_Mac.h4
-rw-r--r--include/views/SkOSWindow_Win.h4
-rwxr-xr-xinclude/views/SkOSWindow_iOS.h4
-rw-r--r--include/views/SkOSWindow_wxwidgets.h10
-rw-r--r--include/views/SkStackViewLayout.h2
-rw-r--r--include/views/SkSystemEventTypes.h2
-rw-r--r--include/views/SkTouchGesture.h6
-rw-r--r--include/views/SkView.h24
-rw-r--r--include/views/SkViewInflate.h4
-rw-r--r--include/views/SkWindow.h4
-rw-r--r--include/views/animated/SkImageView.h8
-rw-r--r--include/views/animated/SkProgressBarView.h12
-rw-r--r--include/views/animated/SkScrollBarView.h8
-rw-r--r--include/views/animated/SkWidgetViews.h22
-rw-r--r--include/xml/SkBML_WXMLParser.h4
-rw-r--r--include/xml/SkDOM.h2
-rw-r--r--include/xml/SkXMLParser.h10
142 files changed, 723 insertions, 723 deletions
diff --git a/include/animator/SkAnimator.h b/include/animator/SkAnimator.h
index e6c5583f27..924c595063 100644
--- a/include/animator/SkAnimator.h
+++ b/include/animator/SkAnimator.h
@@ -42,15 +42,15 @@ enum SkFieldType {
/** \class SkAnimator
The SkAnimator class decodes an XML stream into a display list. The
- display list can be drawn statically as a picture, or can drawn
+ display list can be drawn statically as a picture, or can drawn
different elements at different times to form a moving animation.
SkAnimator does not read the system time on its own; it relies on the
caller to pass the current time. The caller can pause, speed up, or
reverse the animation by varying the time passed in.
- The XML describing the display list must conform to the schema
- described by SkAnimateSchema.xsd.
+ The XML describing the display list must conform to the schema
+ described by SkAnimateSchema.xsd.
The XML must contain an <event> element to draw. Usually, it contains
an <event kind="onload" /> block to add some drawing elements to the
@@ -84,7 +84,7 @@ public:
SkAnimator();
virtual ~SkAnimator();
- /** Add a drawable extension to the graphics engine. Experimental.
+ /** Add a drawable extension to the graphics engine. Experimental.
@param extras A derived class that implements methods that identify and instantiate the class
*/
void addExtras(SkExtras* extras);
@@ -97,7 +97,7 @@ public:
*/
bool appendStream(SkStream* stream);
- /** Read in XML from memory. Returns true if the file can be
+ /** Read in XML from memory. Returns true if the file can be
read without error. Returns false if an error was encountered.
Error diagnostics are stored in fErrorCode and fLineNumber.
@param buffer The XML text as UTF-8 characters.
@@ -106,7 +106,7 @@ public:
*/
bool decodeMemory(const void* buffer, size_t size);
- /** Read in XML from a stream. Returns true if the file can be
+ /** Read in XML from a stream. Returns true if the file can be
read without error. Returns false if an error was encountered.
Error diagnostics are stored in fErrorCode and fLineNumber.
@param stream The stream containg the XML text as UTF-8 characters.
@@ -114,14 +114,14 @@ public:
*/
virtual bool decodeStream(SkStream* stream);
- /** Parse the DOM tree starting at the specified node. Returns true if it can be
+ /** Parse the DOM tree starting at the specified node. Returns true if it can be
parsed without error. Returns false if an error was encountered.
Error diagnostics are stored in fErrorCode and fLineNumber.
@return true if the DOM was parsed successfully.
*/
virtual bool decodeDOM(const SkDOM&, const SkDOMNode*);
- /** Read in XML from a URI. Returns true if the file can be
+ /** Read in XML from a URI. Returns true if the file can be
read without error. Returns false if an error was encountered.
Error diagnostics are stored in fErrorCode and fLineNumber.
@param uri The complete url path to be read (either ftp, http or https).
@@ -131,14 +131,14 @@ public:
/** Pass a char event, usually a keyboard symbol, to the animator.
This triggers events of the form <event kind="keyChar" key="... />
- @param ch The character to match against <event> element "key"
+ @param ch The character to match against <event> element "key"
attributes.
@return true if the event was dispatched successfully.
*/
bool doCharEvent(SkUnichar ch);
/** Experimental:
- Pass a mouse click event along with the mouse coordinates to
+ Pass a mouse click event along with the mouse coordinates to
the animator. This triggers events of the form <event kind="mouseDown" ... />
and other mouse events.
@param state The mouse state, described by SkView::Click::State : values are
@@ -151,48 +151,48 @@ public:
/** Pass a meta-key event, such as an arrow , to the animator.
This triggers events of the form <event kind="keyPress" code="... />
- @param code The key to match against <event> element "code"
+ @param code The key to match against <event> element "code"
attributes.
@return true if the event was dispatched successfully.
*/
bool doKeyEvent(SkKey code);
bool doKeyUpEvent(SkKey code);
-
- /** Send an event to the animator. The animator's clock is set
+
+ /** Send an event to the animator. The animator's clock is set
relative to the current time.
@return true if the event was dispatched successfully.
*/
bool doUserEvent(const SkEvent& evt);
- /** The possible results from the draw function.
+ /** The possible results from the draw function.
*/
enum DifferenceType {
kNotDifferent,
kDifferent,
kPartiallyDifferent
};
- /** Draws one frame of the animation. The first call to draw always
- draws the initial frame of the animation. Subsequent calls draw
- the offset into the animation by
+ /** Draws one frame of the animation. The first call to draw always
+ draws the initial frame of the animation. Subsequent calls draw
+ the offset into the animation by
subtracting the initial time from the current time.
@param canvas The canvas to draw into.
@param paint The paint to draw with.
@param time The offset into the current animation.
@return kNotDifferent if there are no active animations; kDifferent if there are active animations; and
- kPartiallyDifferent if the document contains an active <bounds> element that specifies a minimal
+ kPartiallyDifferent if the document contains an active <bounds> element that specifies a minimal
redraw area.
*/
DifferenceType draw(SkCanvas* canvas, SkPaint* paint, SkMSec time);
/** Draws one frame of the animation, using a new Paint each time.
- The first call to draw always
- draws the initial frame of the animation. Subsequent calls draw
- the offset into the animation by
+ The first call to draw always
+ draws the initial frame of the animation. Subsequent calls draw
+ the offset into the animation by
subtracting the initial time from the current time.
@param canvas The canvas to draw into.
@param time The offset into the current animation.
@return kNotDifferent if there are no active animations; kDifferent if there are active animations; and
- kPartiallyDifferent if the document contains an active <bounds> element that specifies a minimal
+ kPartiallyDifferent if the document contains an active <bounds> element that specifies a minimal
redraw area.
*/
DifferenceType draw(SkCanvas* canvas, SkMSec time);
@@ -203,7 +203,7 @@ public:
@param y ignored
@return true if a mouseDown event handler is enabled.
*/
- bool findClickEvent(SkScalar x, SkScalar y);
+ bool findClickEvent(SkScalar x, SkScalar y);
/** Get the nested animator associated with this element, if any.
@@ -223,7 +223,7 @@ public:
/** Returns the scalar value of the specified element's attribute[index]
@param elementID is the value of the id attribute in the XML of this element
- @param fieldName specifies the name of the attribute
+ @param fieldName specifies the name of the attribute
@param index the array entry
@return the integer value to retrieve, or SK_NaN32 if unsuccessful
*/
@@ -239,7 +239,7 @@ public:
/** Returns the scalar value of the specified element's attribute[index]
@param elementID is the value of the id attribute in the XML of this element
- @param fieldName specifies the name of the attribute
+ @param fieldName specifies the name of the attribute
@param index the array entry
@return the scalar value to retrieve, or SK_ScalarNaN if unsuccessful
*/
@@ -247,7 +247,7 @@ public:
/** Returns the string value of the specified element's attribute[index]
@param element is a value returned by getElement
- @param field is a value returned by getField
+ @param field is a value returned by getField
@param index the array entry
@return the string value to retrieve, or null if unsuccessful
*/
@@ -255,55 +255,55 @@ public:
/** Returns the string value of the specified element's attribute[index]
@param elementID is the value of the id attribute in the XML of this element
- @param fieldName specifies the name of the attribute
+ @param fieldName specifies the name of the attribute
@param index the array entry
@return the string value to retrieve, or null if unsuccessful
*/
const char* getArrayString(const char* elementID, const char* fieldName, int index);
/** Returns the XML element corresponding to the given ID.
- @param elementID is the value of the id attribute in the XML of this element
+ @param elementID is the value of the id attribute in the XML of this element
@return the element matching the ID, or null if the element can't be found
*/
const SkDisplayable* getElement(const char* elementID);
/** Returns the element type corresponding to the XML element.
The element type matches the element name; for instance, <line> returns kElement_LineType
- @param element is a value returned by getElement
+ @param element is a value returned by getElement
@return element type, or 0 if the element can't be found
*/
SkElementType getElementType(const SkDisplayable* element);
/** Returns the element type corresponding to the given ID.
- @param elementID is the value of the id attribute in the XML of this element
+ @param elementID is the value of the id attribute in the XML of this element
@return element type, or 0 if the element can't be found
*/
SkElementType getElementType(const char* elementID);
/** Returns the XML field of the named attribute in the XML element.
@param element is a value returned by getElement
- @param fieldName is the attribute to return
+ @param fieldName is the attribute to return
@return the attribute matching the fieldName, or null if the element can't be found
*/
const SkMemberInfo* getField(const SkDisplayable* element, const char* fieldName);
/** Returns the XML field of the named attribute in the XML element matching the elementID.
@param elementID is the value of the id attribute in the XML of this element
- @param fieldName is the attribute to return
+ @param fieldName is the attribute to return
@return the attribute matching the fieldName, or null if the element can't be found
*/
const SkMemberInfo* getField(const char* elementID, const char* fieldName);
/** Returns the value type coresponding to the element's attribute.
The value type matches the XML schema: and may be kField_BooleanType, kField_ScalarType, etc.
- @param field is a value returned by getField
+ @param field is a value returned by getField
@return the attribute type, or 0 if the element can't be found
*/
SkFieldType getFieldType(const SkMemberInfo* field);
/** Returns the value type coresponding to the element's attribute.
@param elementID is the value of the id attribute in the XML of this element
- @param fieldName specifies the name of the attribute
+ @param fieldName specifies the name of the attribute
@return the attribute type, or 0 if the element can't be found
*/
SkFieldType getFieldType(const char* elementID, const char* fieldName);
@@ -315,54 +315,54 @@ public:
/** Returns the partial rectangle to invalidate after drawing. Call after draw() returns
kIsPartiallyDifferent to do a mimimal inval(). */
- void getInvalBounds(SkRect* inval);
+ void getInvalBounds(SkRect* inval);
- /** Returns the details of any error encountered while parsing the XML.
+ /** Returns the details of any error encountered while parsing the XML.
*/
const SkXMLParserError* getParserError();
-
- /** Returns the details of any error encountered while parsing the XML as string.
+
+ /** Returns the details of any error encountered while parsing the XML as string.
*/
const char* getParserErrorString();
-
+
/** Returns the scalar value of the specified element's attribute
@param element is a value returned by getElement
- @param field is a value returned by getField
+ @param field is a value returned by getField
@return the integer value to retrieve, or SK_NaN32 if not found
*/
int32_t getInt(const SkDisplayable* element, const SkMemberInfo* field);
/** Returns the scalar value of the specified element's attribute
@param elementID is the value of the id attribute in the XML of this element
- @param fieldName specifies the name of the attribute
+ @param fieldName specifies the name of the attribute
@return the integer value to retrieve, or SK_NaN32 if not found
*/
int32_t getInt(const char* elementID, const char* fieldName);
/** Returns the scalar value of the specified element's attribute
@param element is a value returned by getElement
- @param field is a value returned by getField
+ @param field is a value returned by getField
@return the scalar value to retrieve, or SK_ScalarNaN if not found
*/
SkScalar getScalar(const SkDisplayable* element, const SkMemberInfo* field);
/** Returns the scalar value of the specified element's attribute
@param elementID is the value of the id attribute in the XML of this element
- @param fieldName specifies the name of the attribute
+ @param fieldName specifies the name of the attribute
@return the scalar value to retrieve, or SK_ScalarNaN if not found
*/
SkScalar getScalar(const char* elementID, const char* fieldName);
/** Returns the string value of the specified element's attribute
@param element is a value returned by getElement
- @param field is a value returned by getField
+ @param field is a value returned by getField
@return the string value to retrieve, or null if not found
*/
const char* getString(const SkDisplayable* element, const SkMemberInfo* field);
/** Returns the string value of the specified element's attribute
@param elementID is the value of the id attribute in the XML of this element
- @param fieldName specifies the name of the attribute
+ @param fieldName specifies the name of the attribute
@return the string value to retrieve, or null if not found
*/
const char* getString(const char* elementID, const char* fieldName);
@@ -373,31 +373,31 @@ public:
/** Resets the animator to a newly created state with no animation data. */
void initialize();
- /** Experimental. Resets any active animations so that the next time passed is treated as
+ /** Experimental. Resets any active animations so that the next time passed is treated as
time zero. */
void reset();
-
+
/** Sets the scalar value of the specified element's attribute
@param elementID is the value of the id attribute in the XML of this element
- @param fieldName specifies the name of the attribute
+ @param fieldName specifies the name of the attribute
@param array is the c-style array of integers
@param count is the length of the array
@return true if the value was set successfully
*/
bool setArrayInt(const char* elementID, const char* fieldName, const int* array, int count);
-
+
/** Sets the scalar value of the specified element's attribute
@param elementID is the value of the id attribute in the XML of this element
- @param fieldName specifies the name of the attribute
+ @param fieldName specifies the name of the attribute
@param array is the c-style array of strings
@param count is the length of the array
@return true if the value was set successfully
*/
bool setArrayString(const char* elementID, const char* fieldName, const char** array, int count);
-
+
/** Sets the scalar value of the specified element's attribute
@param elementID is the value of the id attribute in the XML of this element
- @param fieldName specifies the name of the attribute
+ @param fieldName specifies the name of the attribute
@param data the integer value to set
@return true if the value was set successfully
*/
@@ -405,7 +405,7 @@ public:
/** Sets the scalar value of the specified element's attribute
@param elementID is the value of the id attribute in the XML of this element
- @param fieldName specifies the name of the attribute
+ @param fieldName specifies the name of the attribute
@param data the scalar value to set
@return true if the value was set successfully
*/
@@ -413,14 +413,14 @@ public:
/** Sets the string value of the specified element's attribute
@param elementID is the value of the id attribute in the XML of this element
- @param fieldName specifies the name of the attribute
+ @param fieldName specifies the name of the attribute
@param data the string value to set
@return true if the value was set successfully
*/
bool setString(const char* elementID, const char* fieldName, const char* data);
- /** Sets the file default directory of the URL base path
- @param path the directory path
+ /** Sets the file default directory of the URL base path
+ @param path the directory path
*/
void setURIBase(const char* path);
@@ -442,7 +442,7 @@ public:
virtual SkMSec getMSecs() const = 0;
};
- /** Sets a user class to return the current time to the animator.
+ /** Sets a user class to return the current time to the animator.
Optional; if not called, the system clock will be used by calling SkTime::GetMSecs instead.
@param callBack the time function
*/
@@ -450,28 +450,28 @@ public:
static void Init(bool runUnitTests);
static void Term();
-
- /** The event sink events generated by the animation are posted to.
+
+ /** The event sink events generated by the animation are posted to.
Screenplay also posts an inval event to this event sink after processing an
event to force a redraw.
@param target the event sink id
*/
void setHostEventSinkID(SkEventSinkID hostID);
SkEventSinkID getHostEventSinkID() const;
-
+
// helper
void setHostEventSink(SkEventSink* sink) {
this->setHostEventSinkID(sink ? sink->getSinkID() : 0);
}
-
+
virtual void setJavaOwner(Handler owner);
-
+
#ifdef SK_DEBUG
virtual void eventDone(const SkEvent& evt);
virtual bool isTrackingEvents();
static bool NoLeaks();
-#endif
-
+#endif
+
protected:
virtual void onSetHostHandler(Handler handler);
virtual void onEventPost(SkEvent*, SkEventSinkID);
@@ -484,7 +484,7 @@ private:
bool setInt(SkDisplayable* element, const SkMemberInfo* field, int32_t data);
bool setScalar(SkDisplayable* element, const SkMemberInfo* field, SkScalar data);
bool setString(SkDisplayable* element, const SkMemberInfo* field, const char* data);
-
+
virtual bool onEvent(const SkEvent&);
SkAnimateMaker* fMaker;
friend class SkAnimateMaker;
diff --git a/include/config/SkUserConfig.h b/include/config/SkUserConfig.h
index 2b77162de6..353272c8bc 100644
--- a/include/config/SkUserConfig.h
+++ b/include/config/SkUserConfig.h
@@ -67,7 +67,7 @@
/* To assist debugging, Skia provides an instance counting utility in
include/core/SkInstCount.h. This flag turns on and off that utility to
- allow instance count tracking in either debug or release builds. By
+ allow instance count tracking in either debug or release builds. By
default it is enabled in debug but disabled in release.
*/
//#define SK_ENABLE_INST_COUNT
diff --git a/include/core/Sk64.h b/include/core/Sk64.h
index b86e0be7d4..d232d82662 100644
--- a/include/core/Sk64.h
+++ b/include/core/Sk64.h
@@ -134,7 +134,7 @@ struct SK_API Sk64 {
fHi = fHi + hi + (sum < fLo);
fLo = sum;
}
-
+
/** Add the specified Sk64 to the number */
void add(int32_t hi, uint32_t lo) {
uint32_t sum = fLo + lo;
@@ -142,18 +142,18 @@ struct SK_API Sk64 {
fHi = fHi + hi + (sum < fLo);
fLo = sum;
}
-
+
/** Add the specified Sk64 to the number */
void add(const Sk64& other) { this->add(other.fHi, other.fLo); }
-
+
/** Subtract the specified Sk64 from the number. (*this) = (*this) - num
*/
void sub(const Sk64& num);
-
+
/** Subtract the number from the specified Sk64. (*this) = num - (*this)
*/
void rsub(const Sk64& num);
-
+
/** Multiply the number by the specified 32 bit integer
*/
void mul(int32_t);
@@ -162,7 +162,7 @@ struct SK_API Sk64 {
kTrunc_DivOption, //!< truncate the result when calling div()
kRound_DivOption //!< round the result when calling div()
};
-
+
/** Divide the number by the specified 32 bit integer, using the specified
divide option (either truncate or round).
*/
@@ -205,19 +205,19 @@ struct SK_API Sk64 {
friend bool operator!=(const Sk64& a, const Sk64& b) {
return a.fHi != b.fHi || a.fLo != b.fLo;
}
-
+
friend bool operator<(const Sk64& a, const Sk64& b) {
return a.fHi < b.fHi || (a.fHi == b.fHi && a.fLo < b.fLo);
}
-
+
friend bool operator<=(const Sk64& a, const Sk64& b) {
return a.fHi < b.fHi || (a.fHi == b.fHi && a.fLo <= b.fLo);
}
-
+
friend bool operator>(const Sk64& a, const Sk64& b) {
return a.fHi > b.fHi || (a.fHi == b.fHi && a.fLo > b.fLo);
}
-
+
friend bool operator>=(const Sk64& a, const Sk64& b) {
return a.fHi > b.fHi || (a.fHi == b.fHi && a.fLo >= b.fLo);
}
diff --git a/include/core/SkAnnotation.h b/include/core/SkAnnotation.h
index 9cdb2d5ae9..e1ecf6caf1 100644
--- a/include/core/SkAnnotation.h
+++ b/include/core/SkAnnotation.h
@@ -48,7 +48,7 @@ protected:
private:
SkDataSet* fDataSet;
uint32_t fFlags;
-
+
void writeToStream(SkWStream*) const;
void readFromStream(SkStream*);
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index c2ef7b53d5..9c81e836f2 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -169,7 +169,7 @@ public:
/** Marks this bitmap as immutable, meaning that the contents of its
pixels will not change for the lifetime of the bitmap and of the
- underlying pixelref. This state can be set, but it cannot be
+ underlying pixelref. This state can be set, but it cannot be
cleared once it is set. This state propagates to all other bitmaps
that share the same pixelref.
*/
@@ -188,11 +188,11 @@ public:
*/
bool isVolatile() const;
- /** Specify whether this bitmap is volatile. Bitmaps are not volatile by
+ /** Specify whether this bitmap is volatile. Bitmaps are not volatile by
default. Temporary bitmaps that are discarded after use should be
marked as volatile. This provides a hint to the device that the bitmap
- should not be cached. Providing this hint when appropriate can
- improve performance by avoiding unnecessary overhead and resource
+ should not be cached. Providing this hint when appropriate can
+ improve performance by avoiding unnecessary overhead and resource
consumption on the device.
*/
void setIsVolatile(bool);
@@ -424,7 +424,7 @@ public:
* does not have any pixels (or has not be locked with lockPixels()).
*/
SkColor getColor(int x, int y) const;
-
+
/** Returns the address of the specified pixel. This performs a runtime
check to know the size of the pixels, and will return the same answer
as the corresponding size-specific method (e.g. getAddr16). Since the
diff --git a/include/core/SkBounder.h b/include/core/SkBounder.h
index 93d2e4f53b..1ede5481f5 100644
--- a/include/core/SkBounder.h
+++ b/include/core/SkBounder.h
@@ -30,10 +30,10 @@ class SkRegion;
class SkBounder : public SkRefCnt {
public:
SK_DECLARE_INST_COUNT(SkBounder)
-
+
SkBounder();
- /* Call to perform a clip test before calling onIRect.
+ /* Call to perform a clip test before calling onIRect.
Returns the result from onIRect.
*/
bool doIRect(const SkIRect&);
diff --git a/include/core/SkChecksum.h b/include/core/SkChecksum.h
index e66df54aaf..e5cc3d101f 100644
--- a/include/core/SkChecksum.h
+++ b/include/core/SkChecksum.h
@@ -21,11 +21,11 @@ private:
ROTL = sizeof(uintptr_t) * 8 - ROTR,
HALFBITS = sizeof(uintptr_t) * 4
};
-
+
static inline uintptr_t Mash(uintptr_t total, uintptr_t value) {
return ((total >> ROTR) | (total << ROTL)) ^ value;
}
-
+
public:
/**
* Compute a 32-bit checksum for a given data block
@@ -37,7 +37,7 @@ public:
*/
static uint32_t Compute(const uint32_t* data, size_t size) {
SkASSERT(SkIsAlign4(size));
-
+
/*
* We want to let the compiler use 32bit or 64bit addressing and math
* so we use uintptr_t as our magic type. This makes the code a little
@@ -46,7 +46,7 @@ public:
*/
uintptr_t result = 0;
const uintptr_t* ptr = reinterpret_cast<const uintptr_t*>(data);
-
+
/*
* count the number of quad element chunks. This takes into account
* if we're on a 32bit or 64bit arch, since we use sizeof(uintptr_t)
@@ -60,13 +60,13 @@ public:
result = Mash(result, *ptr++);
}
size &= ((sizeof(uintptr_t) << 2) - 1);
-
+
data = reinterpret_cast<const uint32_t*>(ptr);
const uint32_t* stop = data + (size >> 2);
while (data < stop) {
result = Mash(result, *data++);
}
-
+
/*
* smash us down to 32bits if we were 64. Note that when uintptr_t is
* 32bits, this code-path should go away, but I still got a warning
diff --git a/include/core/SkChunkAlloc.h b/include/core/SkChunkAlloc.h
index 102962b02a..1b52a35c16 100644
--- a/include/core/SkChunkAlloc.h
+++ b/include/core/SkChunkAlloc.h
@@ -27,12 +27,12 @@ public:
kReturnNil_AllocFailType,
kThrow_AllocFailType
};
-
+
void* alloc(size_t bytes, AllocFailType);
void* allocThrow(size_t bytes) {
return this->alloc(bytes, kThrow_AllocFailType);
}
-
+
/** Call this to unalloc the most-recently allocated ptr by alloc(). On
success, the number of bytes freed is returned, or 0 if the block could
not be unallocated. This is a hint to the underlying allocator that
@@ -40,7 +40,7 @@ public:
to ignore this call (and return 0).
*/
size_t unalloc(void* ptr);
-
+
size_t totalCapacity() const { return fTotalCapacity; }
int blockCount() const { return fBlockCount; }
diff --git a/include/core/SkClipStack.h b/include/core/SkClipStack.h
index c450fa83f4..2ab118d5a7 100644
--- a/include/core/SkClipStack.h
+++ b/include/core/SkClipStack.h
@@ -45,21 +45,21 @@ public:
// The bounding box contains all the pixels that cannot be written to.
// The real bound extends out to infinity and all the pixels outside
// of the bound can be written to. Note that some of the pixels inside
- // the bound may also be writeable but all pixels that cannot be
+ // the bound may also be writeable but all pixels that cannot be
// written to are guaranteed to be inside.
kInsideOut_BoundsType
};
/**
* getBounds places the current finite bound in its first parameter. In its
- * second, it indicates which kind of bound is being returned. If
+ * second, it indicates which kind of bound is being returned. If
* 'canvFiniteBound' is a normal bounding box then it encloses all writeable
- * pixels. If 'canvFiniteBound' is an inside out bounding box then it
+ * pixels. If 'canvFiniteBound' is an inside out bounding box then it
* encloses all the un-writeable pixels and the true/normal bound is the
* infinite plane. isIntersectionOfRects is an optional parameter
* that is true if 'canvFiniteBound' resulted from an intersection of rects.
*/
- void getBounds(SkRect* canvFiniteBound,
+ void getBounds(SkRect* canvFiniteBound,
BoundsType* boundType,
bool* isIntersectionOfRects = NULL) const;
@@ -74,7 +74,7 @@ public:
void clipEmpty();
/**
- * isWideOpen returns true if the clip state corresponds to the infinite
+ * isWideOpen returns true if the clip state corresponds to the infinite
* plane (i.e., draws are not limited at all)
*/
bool isWideOpen() const;
@@ -82,7 +82,7 @@ public:
/**
* Add a callback function that will be called whenever a clip state
* is no longer viable. This will occur whenever restore
- * is called or when a clipDevRect or clipDevPath call updates the
+ * is called or when a clipDevRect or clipDevPath call updates the
* clip within an existing save/restore state. Each clip state is
* represented by a unique generation ID.
*/
@@ -123,7 +123,7 @@ public:
Iter(const SkClipStack& stack, IterStart startLoc);
struct Clip {
- Clip() : fRect(NULL), fPath(NULL), fOp(SkRegion::kIntersect_Op),
+ Clip() : fRect(NULL), fPath(NULL), fOp(SkRegion::kIntersect_Op),
fDoAA(false) {}
friend bool operator==(const Clip& a, const Clip& b);
friend bool operator!=(const Clip& a, const Clip& b);
@@ -147,8 +147,8 @@ public:
const Clip* prev();
/**
- * Moves the iterator to the topmost clip with the specified RegionOp
- * and returns that clip. If no clip with that op is found,
+ * Moves the iterator to the topmost clip with the specified RegionOp
+ * and returns that clip. If no clip with that op is found,
* returns NULL.
*/
const Clip* skipToTopmost(SkRegion::Op op);
@@ -170,7 +170,7 @@ public:
const Clip* updateClip(const SkClipStack::Rec* rec);
};
- /**
+ /**
* The B2TIter iterates from the bottom of the stack to the top.
* It inherits privately from Iter to prevent access to reverse iteration.
*/
@@ -179,10 +179,10 @@ public:
B2TIter() {}
/**
- * Wrap Iter's 2 parameter ctor to force initialization to the
+ * Wrap Iter's 2 parameter ctor to force initialization to the
* beginning of the deque/bottom of the stack
*/
- B2TIter(const SkClipStack& stack)
+ B2TIter(const SkClipStack& stack)
: INHERITED(stack, kBottom_IterStart) {
}
@@ -190,7 +190,7 @@ public:
using Iter::next;
/**
- * Wrap Iter::reset to force initialization to the
+ * Wrap Iter::reset to force initialization to the
* beginning of the deque/bottom of the stack
*/
void reset(const SkClipStack& stack) {
@@ -203,15 +203,15 @@ public:
};
/**
- * GetConservativeBounds returns a conservative bound of the current clip.
- * Since this could be the infinite plane (if inverse fills were involved) the
- * maxWidth and maxHeight parameters can be used to limit the returned bound
+ * GetConservativeBounds returns a conservative bound of the current clip.
+ * Since this could be the infinite plane (if inverse fills were involved) the
+ * maxWidth and maxHeight parameters can be used to limit the returned bound
* to the expected drawing area. Similarly, the offsetX and offsetY parameters
- * allow the caller to offset the returned bound to account for translated
+ * allow the caller to offset the returned bound to account for translated
* drawing areas (i.e., those resulting from a saveLayer). For finite bounds,
- * the translation (+offsetX, +offsetY) is applied before the clamp to the
+ * the translation (+offsetX, +offsetY) is applied before the clamp to the
* maximum rectangle: [0,maxWidth) x [0,maxHeight).
- * isIntersectionOfRects is an optional parameter that is true when
+ * isIntersectionOfRects is an optional parameter that is true when
* 'devBounds' is the result of an intersection of rects. In this case
* 'devBounds' is the exact answer/clip.
*/
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h
index 4c5eee7c13..935b691160 100644
--- a/include/core/SkColorFilter.h
+++ b/include/core/SkColorFilter.h
@@ -112,7 +112,7 @@ public:
are ignored.
*/
static SkColorFilter* CreateLightingFilter(SkColor mul, SkColor add);
-
+
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
protected:
SkColorFilter() {}
diff --git a/include/core/SkColorPriv.h b/include/core/SkColorPriv.h
index 073a4f58f8..a2e1bc5df6 100644
--- a/include/core/SkColorPriv.h
+++ b/include/core/SkColorPriv.h
@@ -67,7 +67,7 @@ static inline int SkAlphaBlend255(S16CPU src, S16CPU dst, U8CPU alpha) {
SkASSERT((int16_t)src == src);
SkASSERT((int16_t)dst == dst);
SkASSERT((uint8_t)alpha == alpha);
-
+
int prod = SkMulS16(src - dst, alpha) + 128;
prod = (prod + (prod >> 8)) >> 8;
return dst + prod;
@@ -242,7 +242,7 @@ static inline SkPMColor SkFourByteInterp256(SkPMColor src, SkPMColor dst,
unsigned r = SkAlphaBlend(SkGetPackedR32(src), SkGetPackedR32(dst), scale);
unsigned g = SkAlphaBlend(SkGetPackedG32(src), SkGetPackedG32(dst), scale);
unsigned b = SkAlphaBlend(SkGetPackedB32(src), SkGetPackedB32(dst), scale);
-
+
return SkPackARGB32(a, r, g, b);
}
@@ -754,32 +754,32 @@ static inline int SkBlend32(int src, int dst, int scale) {
}
static inline SkPMColor SkBlendLCD16(int srcA, int srcR, int srcG, int srcB,
- SkPMColor dst, uint16_t mask) {
+ SkPMColor dst, uint16_t mask) {
if (mask == 0) {
return dst;
}
-
+
/* We want all of these in 5bits, hence the shifts in case one of them
* (green) is 6bits.
*/
int maskR = SkGetPackedR16(mask) >> (SK_R16_BITS - 5);
int maskG = SkGetPackedG16(mask) >> (SK_G16_BITS - 5);
int maskB = SkGetPackedB16(mask) >> (SK_B16_BITS - 5);
-
+
// Now upscale them to 0..32, so we can use blend32
maskR = SkUpscale31To32(maskR);
maskG = SkUpscale31To32(maskG);
maskB = SkUpscale31To32(maskB);
-
+
// srcA has been upscaled to 256 before passed into this function
maskR = maskR * srcA >> 8;
maskG = maskG * srcA >> 8;
maskB = maskB * srcA >> 8;
-
+
int dstR = SkGetPackedR32(dst);
int dstG = SkGetPackedG32(dst);
int dstB = SkGetPackedB32(dst);
-
+
// LCD blitting is only supported if the dst is known/required
// to be opaque
return SkPackARGB32(0xFF,
@@ -790,7 +790,7 @@ static inline SkPMColor SkBlendLCD16(int srcA, int srcR, int srcG, int srcB,
static inline SkPMColor SkBlendLCD16Opaque(int srcR, int srcG, int srcB,
SkPMColor dst, uint16_t mask,
- SkPMColor opaqueDst) {
+ SkPMColor opaqueDst) {
if (mask == 0) {
return dst;
}
@@ -798,23 +798,23 @@ static inline SkPMColor SkBlendLCD16Opaque(int srcR, int srcG, int srcB,
if (0xFFFF == mask) {
return opaqueDst;
}
-
+
/* We want all of these in 5bits, hence the shifts in case one of them
* (green) is 6bits.
*/
int maskR = SkGetPackedR16(mask) >> (SK_R16_BITS - 5);
int maskG = SkGetPackedG16(mask) >> (SK_G16_BITS - 5);
int maskB = SkGetPackedB16(mask) >> (SK_B16_BITS - 5);
-
+
// Now upscale them to 0..32, so we can use blend32
maskR = SkUpscale31To32(maskR);
maskG = SkUpscale31To32(maskG);
maskB = SkUpscale31To32(maskB);
-
+
int dstR = SkGetPackedR32(dst);
int dstG = SkGetPackedG32(dst);
int dstB = SkGetPackedB32(dst);
-
+
// LCD blitting is only supported if the dst is known/required
// to be opaque
return SkPackARGB32(0xFF,
@@ -829,24 +829,24 @@ static inline void SkBlitLCD16Row(SkPMColor dst[], const uint16_t src[],
int srcR = SkColorGetR(color);
int srcG = SkColorGetG(color);
int srcB = SkColorGetB(color);
-
+
srcA = SkAlpha255To256(srcA);
-
+
for (int i = 0; i < width; i++) {
dst[i] = SkBlendLCD16(srcA, srcR, srcG, srcB, dst[i], src[i]);
}
}
static inline void SkBlitLCD16OpaqueRow(SkPMColor dst[], const uint16_t src[],
- SkColor color, int width,
+ SkColor color, int width,
SkPMColor opaqueDst) {
int srcR = SkColorGetR(color);
int srcG = SkColorGetG(color);
int srcB = SkColorGetB(color);
-
+
for (int i = 0; i < width; i++) {
dst[i] = SkBlendLCD16Opaque(srcR, srcG, srcB, dst[i], src[i],
- opaqueDst);
+ opaqueDst);
}
}
diff --git a/include/core/SkComposeShader.h b/include/core/SkComposeShader.h
index 77729d941d..a8a8e0bb60 100644
--- a/include/core/SkComposeShader.h
+++ b/include/core/SkComposeShader.h
@@ -33,7 +33,7 @@ public:
*/
SkComposeShader(SkShader* sA, SkShader* sB, SkXfermode* mode = NULL);
virtual ~SkComposeShader();
-
+
// override
virtual bool setContext(const SkBitmap& device, const SkPaint& paint, const SkMatrix& matrix);
virtual void shadeSpan(int x, int y, SkPMColor result[], int count);
diff --git a/include/core/SkData.h b/include/core/SkData.h
index e371931a3c..4db17a03b3 100644
--- a/include/core/SkData.h
+++ b/include/core/SkData.h
@@ -61,12 +61,12 @@ public:
* of scope, allowing for custom allocation/freeing of the data.
*/
typedef void (*ReleaseProc)(const void* ptr, size_t length, void* context);
-
+
/**
* Create a new dataref by copying the specified data
*/
static SkData* NewWithCopy(const void* data, size_t length);
-
+
/**
* Create a new dataref by copying the specified c-string
* (a null-terminated array of bytes). The returned SkData will have size()
@@ -74,7 +74,7 @@ public:
* as "".
*/
static SkData* NewWithCString(const char cstr[]);
-
+
/**
* Create a new dataref, taking the data ptr as is, and using the
* releaseproc to free it. The proc may be NULL.
@@ -118,10 +118,10 @@ private:
// This is here because SkAutoTUnref creates an internal helper class
// that derives from SkData (i.e., BlockRef) to prevent refs\unrefs.
- // This helper class generates a compiler warning on Windows since the
+ // This helper class generates a compiler warning on Windows since the
// SkData's destructor is private. This friending gives the helper class
// access to the destructor.
- friend class SkAutoTUnref<SkData>::BlockRef<SkData>;
+ friend class SkAutoTUnref<SkData>::BlockRef<SkData>;
typedef SkFlattenable INHERITED;
};
diff --git a/include/core/SkDataSet.h b/include/core/SkDataSet.h
index 734c3c32c2..2e5d96e68a 100644
--- a/include/core/SkDataSet.h
+++ b/include/core/SkDataSet.h
@@ -62,7 +62,7 @@ public:
SkASSERT(!this->done());
fPair += 1;
}
-
+
private:
const SkDataSet::Pair* fPair;
const SkDataSet::Pair* fStop;
diff --git a/include/core/SkDeque.h b/include/core/SkDeque.h
index d29f72a959..eef335d0e5 100644
--- a/include/core/SkDeque.h
+++ b/include/core/SkDeque.h
@@ -14,8 +14,8 @@
/*
* The deque class works by blindly creating memory space of a specified element
- * size. It manages the memory as a doubly linked list of blocks each of which
- * can contain multiple elements. Pushes and pops add/remove blocks from the
+ * size. It manages the memory as a doubly linked list of blocks each of which
+ * can contain multiple elements. Pushes and pops add/remove blocks from the
* beginning/end of the list as necessary while each block tracks the used
* portion of its memory.
* One behavior to be aware of is that the pops do not immediately remove an
@@ -85,22 +85,22 @@ public:
char* fPos;
size_t fElemSize;
};
-
+
// Inherit privately from Iter to prevent access to reverse iteration
class F2BIter : private Iter {
public:
F2BIter() {}
/**
- * Wrap Iter's 2 parameter ctor to force initialization to the
+ * Wrap Iter's 2 parameter ctor to force initialization to the
* beginning of the deque
*/
F2BIter(const SkDeque& d) : INHERITED(d, kFront_IterStart) {}
using Iter::next;
- /**
- * Wrap Iter::reset to force initialization to the beginning of the
+ /**
+ * Wrap Iter::reset to force initialization to the beginning of the
* deque
*/
void reset(const SkDeque& d) {
@@ -113,7 +113,7 @@ public:
private:
// allow unit test to call numBlocksAllocated
- friend class DequeUnitTestHelper;
+ friend class DequeUnitTestHelper;
void* fFront;
void* fBack;
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index 5cf5c502c5..326115ca31 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -138,10 +138,10 @@ public:
*/
const SkIPoint& getOrigin() const { return fOrigin; }
- /**
+ /**
* onAttachToCanvas is invoked whenever a device is installed in a canvas
* (i.e., setDevice, saveLayer (for the new device created by the save),
- * and SkCanvas' SkDevice & SkBitmap -taking ctors). It allows the
+ * and SkCanvas' SkDevice & SkBitmap -taking ctors). It allows the
* devices to prepare for drawing (e.g., locking their pixels, etc.)
*/
virtual void onAttachToCanvas(SkCanvas* canvas) {
@@ -154,7 +154,7 @@ public:
/**
* onDetachFromCanvas notifies a device that it will no longer be drawn to.
* It gives the device a chance to clean up (e.g., unlock its pixels). It
- * is invoked from setDevice (for the displaced device), restore and
+ * is invoked from setDevice (for the displaced device), restore and
* possibly from SkCanvas' dtor.
*/
virtual void onDetachFromCanvas() {
@@ -312,7 +312,7 @@ protected:
access the pixels directly. Note: only the pixels field should be
altered. The config/width/height/rowbytes must remain unchanged.
@param bitmap The device's bitmap
- @return Echo the bitmap parameter, or an alternate (shadow) bitmap
+ @return Echo the bitmap parameter, or an alternate (shadow) bitmap
maintained by the subclass.
*/
virtual const SkBitmap& onAccessBitmap(SkBitmap*);
diff --git a/include/core/SkDither.h b/include/core/SkDither.h
index 692c7e4850..d82b4167b5 100644
--- a/include/core/SkDither.h
+++ b/include/core/SkDither.h
@@ -71,7 +71,7 @@
static inline SkPMColor SkDitherARGB32For565(SkPMColor c, unsigned dither)
{
SkASSERT(dither <= SK_DitherValueMax565);
-
+
unsigned sa = SkGetPackedA32(c);
dither = SkAlphaMul(dither, SkAlpha255To256(sa));
@@ -81,21 +81,21 @@ static inline SkPMColor SkDitherARGB32For565(SkPMColor c, unsigned dither)
sr = SkDITHER_R32_FOR_565(sr, dither);
sg = SkDITHER_G32_FOR_565(sg, dither);
sb = SkDITHER_B32_FOR_565(sb, dither);
-
+
return SkPackARGB32(sa, sr, sg, sb);
}
static inline SkPMColor SkDitherRGB32For565(SkPMColor c, unsigned dither)
{
SkASSERT(dither <= SK_DitherValueMax565);
-
+
unsigned sr = SkGetPackedR32(c);
unsigned sg = SkGetPackedG32(c);
unsigned sb = SkGetPackedB32(c);
sr = SkDITHER_R32_FOR_565(sr, dither);
sg = SkDITHER_G32_FOR_565(sg, dither);
sb = SkDITHER_B32_FOR_565(sb, dither);
-
+
return SkPackARGB32(0xFF, sr, sg, sb);
}
@@ -112,29 +112,29 @@ static inline uint16_t SkDitherRGBTo565(U8CPU r, U8CPU g, U8CPU b,
static inline uint16_t SkDitherRGB32To565(SkPMColor c, unsigned dither)
{
SkASSERT(dither <= SK_DitherValueMax565);
-
+
unsigned sr = SkGetPackedR32(c);
unsigned sg = SkGetPackedG32(c);
unsigned sb = SkGetPackedB32(c);
sr = SkDITHER_R32To565(sr, dither);
sg = SkDITHER_G32To565(sg, dither);
sb = SkDITHER_B32To565(sb, dither);
-
+
return SkPackRGB16(sr, sg, sb);
}
static inline uint16_t SkDitherARGB32To565(U8CPU sa, SkPMColor c, unsigned dither)
{
- SkASSERT(dither <= SK_DitherValueMax565);
+ SkASSERT(dither <= SK_DitherValueMax565);
dither = SkAlphaMul(dither, SkAlpha255To256(sa));
-
+
unsigned sr = SkGetPackedR32(c);
unsigned sg = SkGetPackedG32(c);
unsigned sb = SkGetPackedB32(c);
sr = SkDITHER_R32To565(sr, dither);
sg = SkDITHER_G32To565(sg, dither);
sb = SkDITHER_B32To565(sb, dither);
-
+
return SkPackRGB16(sr, sg, sb);
}
@@ -149,7 +149,7 @@ static inline SkPMColor16 SkDitherARGB32To4444(U8CPU a, U8CPU r, U8CPU g,
r = SkDITHER_R32To4444(r, dither);
g = SkDITHER_G32To4444(g, dither);
b = SkDITHER_B32To4444(b, dither);
-
+
return SkPackARGB4444(a, r, g, b);
}
@@ -166,7 +166,7 @@ static inline SkPMColor16 SkDitherARGB32To4444(SkPMColor c, unsigned dither)
r = SkDITHER_R32To4444(r, dither);
g = SkDITHER_G32To4444(g, dither);
b = SkDITHER_B32To4444(b, dither);
-
+
return SkPackARGB4444(a, r, g, b);
}
diff --git a/include/core/SkDrawFilter.h b/include/core/SkDrawFilter.h
index 1e843ec35f..73b2ca58e0 100644
--- a/include/core/SkDrawFilter.h
+++ b/include/core/SkDrawFilter.h
@@ -24,7 +24,7 @@ class SkPaint;
class SkDrawFilter : public SkRefCnt {
public:
SK_DECLARE_INST_COUNT(SkDrawFilter)
-
+
enum Type {
kPaint_Type,
kPoint_Type,
diff --git a/include/core/SkDrawLooper.h b/include/core/SkDrawLooper.h
index f1fb5bdcb9..8a218c331d 100644
--- a/include/core/SkDrawLooper.h
+++ b/include/core/SkDrawLooper.h
@@ -47,7 +47,7 @@ public:
* init() was first called.
*/
virtual bool next(SkCanvas*, SkPaint* paint) = 0;
-
+
/**
* The fast bounds functions are used to enable the paint to be culled early
* in the drawing pipeline. If a subclass can support this feature it must
diff --git a/include/core/SkFlate.h b/include/core/SkFlate.h
index c111de0fd5..e4c1417d91 100644
--- a/include/core/SkFlate.h
+++ b/include/core/SkFlate.h
@@ -30,19 +30,19 @@ public:
* putting the result into dst. Returns false if an error occurs.
*/
static bool Deflate(SkStream* src, SkWStream* dst);
-
+
/**
* Use the flate compression algorithm to compress the data in src,
* putting the result into dst. Returns false if an error occurs.
*/
static bool Deflate(const void* src, size_t len, SkWStream* dst);
-
+
/**
* Use the flate compression algorithm to compress the data,
* putting the result into dst. Returns false if an error occurs.
*/
static bool Deflate(const SkData*, SkWStream* dst);
-
+
/** Use the flate compression algorithm to decompress the data in src,
putting the result into dst. Returns false if an error occurs.
*/
diff --git a/include/core/SkFlattenable.h b/include/core/SkFlattenable.h
index 9b38032f48..6df9f9b068 100644
--- a/include/core/SkFlattenable.h
+++ b/include/core/SkFlattenable.h
@@ -54,7 +54,7 @@ class SkFlattenableWriteBuffer;
}
/** \class SkFlattenable
-
+
SkFlattenable is the base class for objects that need to be flattened
into a data stream for either transport or as part of the key to the
font cache.
@@ -64,15 +64,15 @@ public:
SK_DECLARE_INST_COUNT(SkFlattenable)
typedef SkFlattenable* (*Factory)(SkFlattenableReadBuffer&);
-
+
SkFlattenable() {}
-
+
/** Implement this to return a factory function pointer that can be called
to recreate your class given a buffer (previously written to by your
override of flatten().
*/
virtual Factory getFactory() = 0;
-
+
static Factory NameToFactory(const char name[]);
static const char* FactoryToName(Factory);
static void Register(const char name[], Factory);
diff --git a/include/core/SkGraphics.h b/include/core/SkGraphics.h
index c7ee07f4ff..c9a0f532f6 100644
--- a/include/core/SkGraphics.h
+++ b/include/core/SkGraphics.h
@@ -16,7 +16,7 @@ class SK_API SkGraphics {
public:
/**
* Call this at process initialization time if your environment does not
- * permit static global initializers that execute code. Note that
+ * permit static global initializers that execute code. Note that
* Init() is not thread-safe.
*/
static void Init();
@@ -38,7 +38,7 @@ public:
* This max can be changed by calling SetFontCacheLimit().
*/
static size_t GetFontCacheLimit();
-
+
/**
* Specify the max number of bytes that should be used by the font cache.
* If the cache needs to allocate more, it will purge previous entries.
@@ -59,7 +59,7 @@ public:
* draws to be recreated, since they will no longer be in the cache.
*/
static void PurgeFontCache();
-
+
/**
* Applications with command line options may pass optional state, such
* as cache sizes, here, for instance:
@@ -69,7 +69,7 @@ public:
* This format is subject to change.
*/
static void SetFlags(const char* flags);
-
+
/**
* Return the max number of bytes that should be used by the thread-local
* font cache.
@@ -82,14 +82,14 @@ public:
* GetFontCacheLimit.
*/
static size_t GetTLSFontCacheLimit();
-
+
/**
* Specify the max number of bytes that should be used by the thread-local
* font cache. If this value is 0, then this thread will use the shared
* global font cache.
*/
static void SetTLSFontCacheLimit(size_t bytes);
-
+
private:
/** This is automatically called by SkGraphics::Init(), and must be
implemented by the host OS. This allows the host OS to register a callback
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index 89e3181d58..985a3bbbbb 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -45,16 +45,16 @@ public:
kRGBA_8888_ColorType,
kBGRA_8888_ColorType,
kPMColor_ColorType,
-
+
kLastEnum_ColorType = kPMColor_ColorType
};
-
+
enum AlphaType {
kIgnore_AlphaType,
kOpaque_AlphaType,
kPremul_AlphaType,
kUnpremul_AlphaType,
-
+
kLastEnum_AlphaType = kUnpremul_AlphaType
};
@@ -63,7 +63,7 @@ public:
int fHeight;
ColorType fColorType;
AlphaType fAlphaType;
-
+
};
static SkImage* NewRasterCopy(const Info&, SkColorSpace*, const void* pixels, size_t rowBytes);
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index e4705c464c..dd5aecde0f 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -66,7 +66,7 @@ public:
* The matrix is the current matrix on the canvas.
*
* Offset is the amount to translate the resulting image relative to the
- * src when it is drawn.
+ * src when it is drawn.
*
* If the result image cannot be created, return false, in which case both
* the result and offset parameters will be ignored by the caller.
@@ -84,7 +84,7 @@ public:
* Returns true if the filter can be expressed a single-pass
* GrCustomStage, used to process this filter on the GPU, or false if
* not.
- *
+ *
* If stage is non-NULL, a new GrCustomStage instance is stored
* in it. The caller assumes ownership of the stage, and it is up to the
* caller to unref it.
diff --git a/include/core/SkInstCnt.h b/include/core/SkInstCnt.h
index db6e273e9f..7ed866befc 100644
--- a/include/core/SkInstCnt.h
+++ b/include/core/SkInstCnt.h
@@ -10,7 +10,7 @@
#define SkInstCnt_DEFINED
/*
- * The instance counting system consists of three macros that create the
+ * The instance counting system consists of three macros that create the
* instance counting machinery. A class is added to the system by adding:
* SK_DECLARE_INST_COUNT at the top of its declaration for derived classes
* SK_DECLARE_INST_COUNT_ROOT at the top of its declaration for a root class
diff --git a/include/core/SkLineClipper.h b/include/core/SkLineClipper.h
index 2c75e5e2d5..5827dbe2ce 100644
--- a/include/core/SkLineClipper.h
+++ b/include/core/SkLineClipper.h
@@ -22,7 +22,7 @@ public:
lie completely above or below the clip. For portions to the left or
right, turn those into vertical line segments that are aligned to the
edge of the clip.
-
+
Return the number of line segments that result, and store the end-points
of those segments sequentially in lines as follows:
1st segment: lines[0]..lines[1]
@@ -35,7 +35,7 @@ public:
/* Intersect the line segment against the rect. If there is a non-empty
resulting segment, return true and set dst[] to that segment. If not,
return false and ignore dst[].
-
+
ClipLine is specialized for scan-conversion, as it adds vertical
segments on the sides to show where the line extended beyond the
left or right sides. IntersectLine does not.
diff --git a/include/core/SkMMapStream.h b/include/core/SkMMapStream.h
index 19ba634ccc..a3b35f2df8 100644
--- a/include/core/SkMMapStream.h
+++ b/include/core/SkMMapStream.h
@@ -21,9 +21,9 @@ public:
private:
void* fAddr;
size_t fSize;
-
+
void closeMMap();
-
+
typedef SkMemoryStream INHERITED;
};
diff --git a/include/core/SkMallocPixelRef.h b/include/core/SkMallocPixelRef.h
index 1bf1afc694..2241a513e7 100644
--- a/include/core/SkMallocPixelRef.h
+++ b/include/core/SkMallocPixelRef.h
@@ -23,7 +23,7 @@ public:
*/
SkMallocPixelRef(void* addr, size_t size, SkColorTable* ctable, bool ownPixels = true);
virtual ~SkMallocPixelRef();
-
+
//! Return the allocation size for the pixels
size_t getSize() const { return fSize; }
void* getAddr() const { return fStorage; }
diff --git a/include/core/SkMask.h b/include/core/SkMask.h
index 3f9a11449c..5dadb63d5b 100644
--- a/include/core/SkMask.h
+++ b/include/core/SkMask.h
@@ -136,7 +136,7 @@ public:
SkAutoMaskFreeImage(uint8_t* maskImage) {
fImage = maskImage;
}
-
+
~SkAutoMaskFreeImage() {
SkMask::FreeImage(fImage);
}
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h
index 6cf4d8f761..f2c6512c5c 100644
--- a/include/core/SkMatrix.h
+++ b/include/core/SkMatrix.h
@@ -44,9 +44,9 @@ public:
kPerspective_Mask = 0x08 //!< set if the matrix is in perspective
};
- /** Returns a bitfield describing the transformations the matrix may
+ /** Returns a bitfield describing the transformations the matrix may
perform. The bitfield is computed conservatively, so it may include
- false positives. For example, when kPerspective_Mask is true, all
+ false positives. For example, when kPerspective_Mask is true, all
other bits may be set to true even in the case of a pure perspective
transform.
*/
@@ -96,7 +96,7 @@ public:
kMPersp1,
kMPersp2
};
-
+
/** Affine arrays are in column major order
because that's how PDF and XPS like it.
*/
@@ -113,12 +113,12 @@ public:
SkASSERT((unsigned)index < 9);
return fMat[index];
}
-
+
SkScalar get(int index) const {
SkASSERT((unsigned)index < 9);
return fMat[index];
}
-
+
SkScalar getScaleX() const { return fMat[kMScaleX]; }
SkScalar getScaleY() const { return fMat[kMScaleY]; }
SkScalar getSkewY() const { return fMat[kMSkewY]; }
@@ -163,7 +163,7 @@ public:
fMat[kMPersp2] = persp2;
this->setTypeMask(kUnknown_Mask);
}
-
+
/** Set the matrix to identity
*/
void reset();
@@ -323,7 +323,7 @@ public:
@return true if the matrix can be represented by the rectangle mapping.
*/
bool setRectToRect(const SkRect& src, const SkRect& dst, ScaleToFit stf);
-
+
/** Set the matrix such that the specified src points would map to the
specified dst points. count must be within [0..4].
@param src The array of src points
@@ -375,7 +375,7 @@ public:
void mapPoints(SkPoint pts[], int count) const {
this->mapPoints(pts, pts, count);
}
-
+
/** Like mapPoints but with custom byte stride between the points. Stride
* should be a multiple of sizeof(SkScalar).
*/
@@ -461,7 +461,7 @@ public:
SkASSERT((mask & ~kAllMasks) == 0);
return gMapXYProcs[mask & kAllMasks];
}
-
+
MapXYProc getMapXYProc() const {
return GetMapXYProc(this->getType());
}
@@ -473,7 +473,7 @@ public:
SkASSERT((mask & ~kAllMasks) == 0);
return gMapPtsProcs[mask & kAllMasks];
}
-
+
MapPtsProc getMapPtsProc() const {
return GetMapPtsProc(this->getType());
}
@@ -515,7 +515,7 @@ public:
uint32_t writeToMemory(void* buffer) const;
// return the number of bytes read
uint32_t readFromMemory(const void* buffer);
-
+
void dump() const;
void toDumpString(SkString*) const;
@@ -551,7 +551,7 @@ private:
/** Set if the matrix will map a rectangle to another rectangle. This
can be true if the matrix is scale-only, or rotates a multiple of
90 degrees.
-
+
This bit will be set on identity matrices
*/
kRectStaysRect_Mask = 0x10,
@@ -617,7 +617,7 @@ private:
}
return ((fTypeMask & 0xF) == 0);
}
-
+
static bool Poly2Proc(const SkPoint[], SkMatrix*, const SkPoint& scale);
static bool Poly3Proc(const SkPoint[], SkMatrix*, const SkPoint& scale);
static bool Poly4Proc(const SkPoint[], SkMatrix*, const SkPoint& scale);
@@ -629,9 +629,9 @@ private:
static void Rot_xy(const SkMatrix&, SkScalar, SkScalar, SkPoint*);
static void RotTrans_xy(const SkMatrix&, SkScalar, SkScalar, SkPoint*);
static void Persp_xy(const SkMatrix&, SkScalar, SkScalar, SkPoint*);
-
+
static const MapXYProc gMapXYProcs[];
-
+
static void Identity_pts(const SkMatrix&, SkPoint[], const SkPoint[], int);
static void Trans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int);
static void Scale_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int);
@@ -641,7 +641,7 @@ private:
static void RotTrans_pts(const SkMatrix&, SkPoint dst[], const SkPoint[],
int count);
static void Persp_pts(const SkMatrix&, SkPoint dst[], const SkPoint[], int);
-
+
static const MapPtsProc gMapPtsProcs[];
friend class SkPerspIter;
diff --git a/include/core/SkOSFile.h b/include/core/SkOSFile.h
index 9f01ead683..45d9d66270 100644
--- a/include/core/SkOSFile.h
+++ b/include/core/SkOSFile.h
@@ -7,7 +7,7 @@
*/
-//
+//
#ifndef SkOSFile_DEFINED
#define SkOSFile_DEFINED
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 0e68f03fcf..096344f6dd 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -208,7 +208,7 @@ public:
bool isVerticalText() const {
return SkToBool(this->getFlags() & kVerticalText_Flag);
}
-
+
/**
* Helper for setting or clearing the kVerticalText_Flag bit in
* setFlags(...).
@@ -583,7 +583,7 @@ public:
SkImageFilter* getImageFilter() const { return fImageFilter; }
SkImageFilter* setImageFilter(SkImageFilter*);
-
+
SkAnnotation* getAnnotation() const { return fAnnotation; }
SkAnnotation* setAnnotation(SkAnnotation*);
@@ -787,7 +787,7 @@ public:
/** Return the number of bytes of text that were measured. If
* isVerticalText() is true, then the vertical advances are used for
* the measurement.
- *
+ *
* @param text The text to be measured
* @param length Number of bytes of text to measure
* @param maxWidth Maximum width. Only the subset of text whose accumulated
@@ -826,7 +826,7 @@ public:
void getTextPath(const void* text, size_t length, SkScalar x, SkScalar y,
SkPath* path) const;
- void getPosTextPath(const void* text, size_t length,
+ void getPosTextPath(const void* text, size_t length,
const SkPoint pos[], SkPath* path) const;
#ifdef SK_BUILD_FOR_ANDROID
@@ -858,18 +858,18 @@ public:
}
return !this->getRasterizer();
}
-
+
/** Only call this if canComputeFastBounds() returned true. This takes a
raw rectangle (the raw bounds of a shape), and adjusts it for stylistic
effects in the paint (e.g. stroking). If needed, it uses the storage
rect parameter. It returns the adjusted bounds that can then be used
for quickReject tests.
-
+
The returned rect will either be orig or storage, thus the caller
should not rely on storage being set to the result, but should always
use the retured value. It is legal for orig and storage to be the same
rect.
-
+
e.g.
if (paint.canComputeFastBounds()) {
SkRect r, storage;
@@ -891,20 +891,20 @@ public:
return orig;
}
}
-
+
return this->doComputeFastBounds(orig, storage, style);
}
-
+
const SkRect& computeFastStrokeBounds(const SkRect& orig,
SkRect* storage) const {
return this->doComputeFastBounds(orig, storage, kStroke_Style);
}
-
+
// Take the style explicitly, so the caller can force us to be stroked
// without having to make a copy of the paint just to change that field.
const SkRect& doComputeFastBounds(const SkRect& orig, SkRect* storage,
Style) const;
-
+
private:
SkTypeface* fTypeface;
SkScalar fTextSize;
diff --git a/include/core/SkPath.h b/include/core/SkPath.h
index 4f0ee7de6f..6016895e94 100644
--- a/include/core/SkPath.h
+++ b/include/core/SkPath.h
@@ -181,7 +181,7 @@ public:
This does NOT change the fill-type setting nor isConvex
*/
void reset();
-
+
/** Similar to reset(), in that all lines and curves are removed from the
path. However, any internal storage for those lines/curves is retained,
making reuse of the path potentially faster.
@@ -246,7 +246,7 @@ public:
/** Returns true if the path specifies a rectangle. If so, and if rect is
not null, set rect to the bounds of the path. If the path does not
specify a rectangle, return false and ignore rect.
-
+
@param rect If not null, returns the bounds of the path if it specifies
a rectangle
@return true if the path specifies a rectangle
@@ -266,7 +266,7 @@ public:
SkPoint getPoint(int index) const;
/** Returns the number of points in the path. Up to max points are copied.
-
+
@param points If not null, receives up to max points
@param max The maximum number of points to copy into points
@return the actual number of points in the path
@@ -281,7 +281,7 @@ public:
/** Returns the number of verbs in the path. Up to max verbs are copied. The
verbs are copied as one byte per verb.
-
+
@param verbs If not null, receives up to max verbs
@param max The maximum number of verbs to copy into verbs
@return the actual number of verbs in the path
@@ -317,21 +317,21 @@ public:
/** Hint to the path to prepare for adding more points. This can allow the
path to more efficiently grow its storage.
-
+
@param extraPtCount The number of extra points the path should
preallocate for.
*/
void incReserve(unsigned extraPtCount);
/** Set the beginning of the next contour to the point (x,y).
-
+
@param x The x-coordinate of the start of a new contour
@param y The y-coordinate of the start of a new contour
*/
void moveTo(SkScalar x, SkScalar y);
/** Set the beginning of the next contour to the point
-
+
@param p The start of a new contour
*/
void moveTo(const SkPoint& p) {
@@ -341,7 +341,7 @@ public:
/** Set the beginning of the next contour relative to the last point on the
previous contour. If there is no previous contour, this is treated the
same as moveTo().
-
+
@param dx The amount to add to the x-coordinate of the end of the
previous contour, to specify the start of a new contour
@param dy The amount to add to the y-coordinate of the end of the
@@ -371,7 +371,7 @@ public:
/** Same as lineTo, but the coordinates are considered relative to the last
point on this contour. If there is no previous point, then a moveTo(0,0)
is inserted automatically.
-
+
@param dx The amount to add to the x-coordinate of the previous point
on this contour, to specify a line
@param dy The amount to add to the y-coordinate of the previous point
@@ -382,7 +382,7 @@ public:
/** Add a quadratic bezier from the last point, approaching control point
(x1,y1), and ending at (x2,y2). If no moveTo() call has been made for
this contour, the first point is automatically set to (0,0).
-
+
@param x1 The x-coordinate of the control point on a quadratic curve
@param y1 The y-coordinate of the control point on a quadratic curve
@param x2 The x-coordinate of the end point on a quadratic curve
@@ -393,7 +393,7 @@ public:
/** Add a quadratic bezier from the last point, approaching control point
p1, and ending at p2. If no moveTo() call has been made for this
contour, the first point is automatically set to (0,0).
-
+
@param p1 The control point on a quadratic curve
@param p2 The end point on a quadratic curve
*/
@@ -419,7 +419,7 @@ public:
/** Add a cubic bezier from the last point, approaching control points
(x1,y1) and (x2,y2), and ending at (x3,y3). If no moveTo() call has been
made for this contour, the first point is automatically set to (0,0).
-
+
@param x1 The x-coordinate of the 1st control point on a cubic curve
@param y1 The y-coordinate of the 1st control point on a cubic curve
@param x2 The x-coordinate of the 2nd control point on a cubic curve
@@ -433,7 +433,7 @@ public:
/** Add a cubic bezier from the last point, approaching control points p1
and p2, and ending at p3. If no moveTo() call has been made for this
contour, the first point is automatically set to (0,0).
-
+
@param p1 The 1st control point on a cubic curve
@param p2 The 2nd control point on a cubic curve
@param p3 The end point on a cubic curve
@@ -445,7 +445,7 @@ public:
/** Same as cubicTo, but the coordinates are considered relative to the
current point on this contour. If there is no previous point, then a
moveTo(0,0) is inserted automatically.
-
+
@param dx1 The amount to add to the x-coordinate of the last point on
this contour, to specify the 1st control point of a cubic curve
@param dy1 The amount to add to the y-coordinate of the last point on
@@ -467,7 +467,7 @@ public:
automatic lineTo() is added to connect the current contour to the start
of the arc. However, if the path is empty, then we call moveTo() with
the first point of the arc. The sweep angle is treated mod 360.
-
+
@param oval The bounding oval defining the shape and size of the arc
@param startAngle Starting angle (in degrees) where the arc begins
@param sweepAngle Sweep angle (in degrees) measured clockwise. This is
@@ -562,7 +562,7 @@ public:
Direction dir = kCW_Direction);
/** Add the specified arc to the path as a new contour.
-
+
@param oval The bounds of oval used to define the size of the arc
@param startAngle Starting angle (in degrees) where the arc begins
@param sweepAngle Sweep angle (in degrees) measured clockwise
@@ -627,17 +627,17 @@ public:
void reverseAddPath(const SkPath& src);
/** Offset the path by (dx,dy), returning true on success
-
- @param dx The amount in the X direction to offset the entire path
- @param dy The amount in the Y direction to offset the entire path
+
+ @param dx The amount in the X direction to offset the entire path
+ @param dy The amount in the Y direction to offset the entire path
@param dst The translated path is written here
*/
void offset(SkScalar dx, SkScalar dy, SkPath* dst) const;
/** Offset the path by (dx,dy), returning true on success
-
- @param dx The amount in the X direction to offset the entire path
- @param dy The amount in the Y direction to offset the entire path
+
+ @param dx The amount in the X direction to offset the entire path
+ @param dy The amount in the Y direction to offset the entire path
*/
void offset(SkScalar dx, SkScalar dy) {
this->offset(dx, dy, this);
@@ -645,7 +645,7 @@ public:
/** Transform the points in this path by matrix, and write the answer into
dst.
-
+
@param matrix The matrix to apply to the path
@param dst The transformed path is written here
*/
@@ -662,14 +662,14 @@ public:
/** Return the last point on the path. If no points have been added, (0,0)
is returned. If there are no points, this returns false, otherwise it
returns true.
-
+
@param lastPt The last point on the path is returned here
*/
bool getLastPt(SkPoint* lastPt) const;
/** Set the last point on the path. If no points have been added,
moveTo(x,y) is automatically called.
-
+
@param x The new x-coordinate for the last point
@param y The new y-coordinate for the last point
*/
@@ -780,7 +780,7 @@ public:
/** Return the next verb in this iteration of the path. When all
segments have been visited, return kDone_Verb.
-
+
@param pts The points representing the current verb and/or segment
This must not be NULL.
@return The verb for the current segment
diff --git a/include/core/SkPathEffect.h b/include/core/SkPathEffect.h
index accdc39f37..5d9b68af36 100644
--- a/include/core/SkPathEffect.h
+++ b/include/core/SkPathEffect.h
@@ -42,7 +42,7 @@ public:
bool isHairlineStyle() const {
return kHairline_Style == this->getStyle();
}
-
+
bool isFillStyle() const {
return kFill_Style == this->getStyle();
}
@@ -157,7 +157,7 @@ protected:
// these are visible to our subclasses
SkPathEffect* fPE0, *fPE1;
-
+
private:
typedef SkPathEffect INHERITED;
};
@@ -188,7 +188,7 @@ private:
// illegal
SkComposePathEffect(const SkComposePathEffect&);
SkComposePathEffect& operator=(const SkComposePathEffect&);
-
+
typedef SkPairPathEffect INHERITED;
};
diff --git a/include/core/SkPathMeasure.h b/include/core/SkPathMeasure.h
index 3419e6683f..6866ccedae 100644
--- a/include/core/SkPathMeasure.h
+++ b/include/core/SkPathMeasure.h
@@ -41,7 +41,7 @@ public:
Returns false if there is no path, or a zero-length path was specified, in which case
position and tangent are unchanged.
*/
- bool SK_WARN_UNUSED_RESULT getPosTan(SkScalar distance, SkPoint* position,
+ bool SK_WARN_UNUSED_RESULT getPosTan(SkScalar distance, SkPoint* position,
SkVector* tangent);
enum MatrixFlags {
@@ -55,7 +55,7 @@ public:
Returns false if there is no path, or a zero-length path was specified, in which case
matrix is unchanged.
*/
- bool SK_WARN_UNUSED_RESULT getMatrix(SkScalar distance, SkMatrix* matrix,
+ bool SK_WARN_UNUSED_RESULT getMatrix(SkScalar distance, SkMatrix* matrix,
MatrixFlags flags = kGetPosAndTan_MatrixFlag);
/** Given a start and stop distance, return in dst the intervening segment(s).
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index dae7ed7829..8a633dc910 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -43,12 +43,12 @@ public:
*/
explicit SkPicture(SkStream*);
virtual ~SkPicture();
-
+
/**
* Swap the contents of the two pictures. Guaranteed to succeed.
*/
void swap(SkPicture& other);
-
+
enum RecordingFlags {
/* This flag specifies that when clipPath() is called, the path will
be faithfully recorded, but the recording canvas' current clip will
@@ -92,7 +92,7 @@ public:
@param surface the canvas receiving the drawing commands.
*/
void draw(SkCanvas* surface);
-
+
/** Return the width of the picture's recording canvas. This
value reflects what was passed to setSize(), and does not necessarily
reflect the bounds of what has been recorded into the picture.
@@ -111,10 +111,10 @@ public:
/** Signals that the caller is prematurely done replaying the drawing
commands. This can be called from a canvas virtual while the picture
- is drawing. Has no effect if the picture is not drawing.
+ is drawing. Has no effect if the picture is not drawing.
*/
void abortPlayback();
-
+
private:
int fWidth, fHeight;
SkPictureRecord* fRecord;
@@ -136,11 +136,11 @@ public:
~SkAutoPictureRecord() {
fPicture->endRecording();
}
-
+
/** Return the canvas to draw into for recording into the picture.
*/
SkCanvas* getRecordingCanvas() const { return fCanvas; }
-
+
private:
SkPicture* fPicture;
SkCanvas* fCanvas;
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h
index 1b632d36e8..9222b29e43 100644
--- a/include/core/SkPixelRef.h
+++ b/include/core/SkPixelRef.h
@@ -121,7 +121,7 @@ public:
/** Makes a deep copy of this PixelRef, respecting the requested config.
Returns NULL if either there is an error (e.g. the destination could
- not be created with the given config), or this PixelRef does not
+ not be created with the given config), or this PixelRef does not
support deep copies. */
virtual SkPixelRef* deepCopy(SkBitmap::Config config) { return NULL; }
diff --git a/include/core/SkPoint.h b/include/core/SkPoint.h
index 5e20f530c4..1ba710d85a 100644
--- a/include/core/SkPoint.h
+++ b/include/core/SkPoint.h
@@ -173,7 +173,7 @@ struct SK_API SkPoint {
fX = SkScalarAbs(pt.fX);
fY = SkScalarAbs(pt.fY);
}
-
+
// counter-clockwise fan
void setIRectFan(int l, int t, int r, int b) {
SkPoint* v = this;
@@ -322,10 +322,10 @@ struct SK_API SkPoint {
SkScalar accum = 0;
accum *= fX;
accum *= fY;
-
+
// accum is either NaN or it is finite (zero).
SkASSERT(0 == accum || !(accum == accum));
-
+
// value==value will be true iff value is not NaN
// TODO: is it faster to say !accum or accum==accum?
return accum == accum;
@@ -431,11 +431,11 @@ struct SK_API SkPoint {
SkScalar dot(const SkPoint& vec) const {
return DotProduct(*this, vec);
}
-
+
SkScalar lengthSqd() const {
return DotProduct(*this, *this);
}
-
+
SkScalar distanceToSqd(const SkPoint& pt) const {
SkScalar dx = fX - pt.fX;
SkScalar dy = fY - pt.fY;
diff --git a/include/core/SkPreConfig.h b/include/core/SkPreConfig.h
index 55b1abf3bc..9104fa47a3 100644
--- a/include/core/SkPreConfig.h
+++ b/include/core/SkPreConfig.h
@@ -48,7 +48,7 @@
/* Even if the user only defined the NDK variant we still need to build
* the default Android code. Therefore, when attempting to include/exclude
- * something from the NDK variant check first that we are building for
+ * something from the NDK variant check first that we are building for
* Android then check the status of the NDK define.
*/
#if defined(SK_BUILD_FOR_ANDROID_NDK) && !defined(SK_BUILD_FOR_ANDROID)
diff --git a/include/core/SkReader32.h b/include/core/SkReader32.h
index 1bdf949566..4f6809fd9e 100644
--- a/include/core/SkReader32.h
+++ b/include/core/SkReader32.h
@@ -27,11 +27,11 @@ public:
void setMemory(const void* data, size_t size) {
SkASSERT(ptr_align_4(data));
SkASSERT(SkAlign4(size) == size);
-
+
fBase = fCurr = (const char*)data;
fStop = (const char*)data + size;
}
-
+
uint32_t size() const { return SkToU32(fStop - fBase); }
uint32_t offset() const { return SkToU32(fCurr - fBase); }
bool eof() const { return fCurr >= fStop; }
@@ -40,7 +40,7 @@ public:
uint32_t available() const { return SkToU32(fStop - fCurr); }
bool isAvailable(uint32_t size) const { return fCurr + size <= fStop; }
-
+
void rewind() { fCurr = fBase; }
void setOffset(size_t offset) {
@@ -48,9 +48,9 @@ public:
SkASSERT(offset <= this->size());
fCurr = fBase + offset;
}
-
+
bool readBool() { return this->readInt() != 0; }
-
+
int32_t readInt() {
SkASSERT(ptr_align_4(fCurr));
int32_t value = *(const int32_t*)fCurr;
@@ -78,7 +78,7 @@ public:
SkASSERT(fCurr <= fStop);
return value;
}
-
+
const void* skip(size_t size) {
SkASSERT(ptr_align_4(fCurr));
const void* addr = fCurr;
@@ -86,7 +86,7 @@ public:
SkASSERT(fCurr <= fStop);
return addr;
}
-
+
template <typename T> const T& skipT() {
SkASSERT(SkAlign4(sizeof(T)) == sizeof(T));
return *(const T*)this->skip(sizeof(T));
@@ -99,7 +99,7 @@ public:
fCurr += SkAlign4(size);
SkASSERT(fCurr <= fStop);
}
-
+
uint8_t readU8() { return (uint8_t)this->readInt(); }
uint16_t readU16() { return (uint16_t)this->readInt(); }
int32_t readS32() { return this->readInt(); }
@@ -141,7 +141,7 @@ private:
const char* fCurr; // current position within buffer
const char* fStop; // end of buffer
const char* fBase; // beginning of buffer
-
+
#ifdef SK_DEBUG
static bool ptr_align_4(const void* ptr) {
return (((const char*)ptr - (const char*)NULL) & 3) == 0;
diff --git a/include/core/SkRect.h b/include/core/SkRect.h
index 723f5f6e2b..23af56006c 100644
--- a/include/core/SkRect.h
+++ b/include/core/SkRect.h
@@ -25,25 +25,25 @@ struct SK_API SkIRect {
r.setEmpty();
return r;
}
-
+
static SkIRect SK_WARN_UNUSED_RESULT MakeWH(int32_t w, int32_t h) {
SkIRect r;
r.set(0, 0, w, h);
return r;
}
-
+
static SkIRect SK_WARN_UNUSED_RESULT MakeSize(const SkISize& size) {
SkIRect r;
r.set(0, 0, size.width(), size.height());
return r;
}
-
+
static SkIRect SK_WARN_UNUSED_RESULT MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b) {
SkIRect rect;
rect.set(l, t, r, b);
return rect;
}
-
+
static SkIRect SK_WARN_UNUSED_RESULT MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h) {
SkIRect r;
r.set(x, y, x + w, y + h);
@@ -54,7 +54,7 @@ struct SK_API SkIRect {
int top() const { return fTop; }
int right() const { return fRight; }
int bottom() const { return fBottom; }
-
+
/** return the left edge of the rect */
int x() const { return fLeft; }
/** return the top edge of the rect */
@@ -64,18 +64,18 @@ struct SK_API SkIRect {
* (i.e. left <= right) so the result may be negative.
*/
int width() const { return fRight - fLeft; }
-
+
/**
* Returns the rectangle's height. This does not check for a valid rect
* (i.e. top <= bottom) so the result may be negative.
*/
int height() const { return fBottom - fTop; }
-
+
/**
* Return true if the rectangle's width or height are <= 0
*/
bool isEmpty() const { return fLeft >= fRight || fTop >= fBottom; }
-
+
friend bool operator==(const SkIRect& a, const SkIRect& b) {
return !memcmp(&a, &b, sizeof(a));
}
@@ -118,7 +118,7 @@ struct SK_API SkIRect {
fLeft = fTop = SK_MinS32;
fRight = fBottom = SK_MaxS32;
}
-
+
/**
* Make the largest representable rectangle, but inverted (e.g. fLeft will
* be max 32bit and right will be min 32bit).
@@ -127,7 +127,7 @@ struct SK_API SkIRect {
fLeft = fTop = SK_MaxS32;
fRight = fBottom = SK_MinS32;
}
-
+
/** Offset set the rectangle by adding dx to its left and right,
and adding dy to its top and bottom.
*/
@@ -163,7 +163,7 @@ struct SK_API SkIRect {
bool quickReject(int l, int t, int r, int b) const {
return l >= fRight || fLeft >= r || t >= fBottom || fTop >= b;
}
-
+
/** Returns true if (x,y) is inside the rectangle and the rectangle is not
empty. The left and top are considered to be inside, while the right
and bottom are not. Thus for the rectangle (0, 0, 5, 10), the
@@ -205,11 +205,11 @@ struct SK_API SkIRect {
return fLeft <= left && fTop <= top &&
fRight >= right && fBottom >= bottom;
}
-
+
bool containsNoEmptyCheck(const SkIRect& r) const {
return containsNoEmptyCheck(r.fLeft, r.fTop, r.fRight, r.fBottom);
}
-
+
/** If r intersects this rectangle, return true and set this rectangle to that
intersection, otherwise return false and do not change this rectangle.
If either rectangle is empty, do nothing and return false.
@@ -225,7 +225,7 @@ struct SK_API SkIRect {
*/
bool intersect(const SkIRect& a, const SkIRect& b) {
SkASSERT(&a && &b);
-
+
if (!a.isEmpty() && !b.isEmpty() &&
a.fLeft < b.fRight && b.fLeft < a.fRight &&
a.fTop < b.fBottom && b.fTop < a.fBottom) {
@@ -237,7 +237,7 @@ struct SK_API SkIRect {
}
return false;
}
-
+
/** If rectangles a and b intersect, return true and set this rectangle to
that intersection, otherwise return false and do not change this
rectangle. For speed, no check to see if a or b are empty is performed.
@@ -247,7 +247,7 @@ struct SK_API SkIRect {
bool intersectNoEmptyCheck(const SkIRect& a, const SkIRect& b) {
SkASSERT(&a && &b);
SkASSERT(!a.isEmpty() && !b.isEmpty());
-
+
if (a.fLeft < b.fRight && b.fLeft < a.fRight &&
a.fTop < b.fBottom && b.fTop < a.fBottom) {
fLeft = SkMax32(a.fLeft, b.fLeft);
@@ -275,7 +275,7 @@ struct SK_API SkIRect {
}
return false;
}
-
+
/** Returns true if a and b are not empty, and they intersect
*/
static bool Intersects(const SkIRect& a, const SkIRect& b) {
@@ -283,7 +283,7 @@ struct SK_API SkIRect {
a.fLeft < b.fRight && b.fLeft < a.fRight &&
a.fTop < b.fBottom && b.fTop < a.fBottom;
}
-
+
/**
* Returns true if a and b intersect. debug-asserts that neither are empty.
*/
@@ -293,7 +293,7 @@ struct SK_API SkIRect {
return a.fLeft < b.fRight && b.fLeft < a.fRight &&
a.fTop < b.fBottom && b.fTop < a.fBottom;
}
-
+
/** Update this rectangle to enclose itself and the specified rectangle.
If this rectangle is empty, just set it to the specified rectangle. If the specified
rectangle is empty, do nothing.
@@ -360,7 +360,7 @@ struct SK_API SkRect {
* Return true if the rectangle's width or height are <= 0
*/
bool isEmpty() const { return fLeft >= fRight || fTop >= fBottom; }
-
+
/**
* Returns true iff all values in the rect are finite. If any are
* infinite or NaN (or SK_FixedNaN when SkScalar is fixed) then this
@@ -373,7 +373,7 @@ struct SK_API SkRect {
accum *= fTop;
accum *= fRight;
accum *= fBottom;
-
+
// accum is either NaN or it is finite (zero).
SkASSERT(0 == accum || !(accum == accum));
@@ -459,14 +459,14 @@ struct SK_API SkRect {
void setBounds(const SkPoint pts[], int count) {
(void)this->setBoundsCheck(pts, count);
}
-
+
/**
* Compute the bounds of the array of points, and set this rect to that
* bounds and return true... unless a non-finite value is encountered,
* in which case this rect is set to empty and false is returned.
*/
bool setBoundsCheck(const SkPoint pts[], int count);
-
+
void set(const SkPoint& p0, const SkPoint& p1) {
fLeft = SkMinScalar(p0.fX, p1.fX);
fRight = SkMaxScalar(p0.fX, p1.fX);
@@ -488,7 +488,7 @@ struct SK_API SkRect {
fLeft = fTop = SK_ScalarMin;
fRight = fBottom = SK_ScalarMax;
}
-
+
/**
* Make the largest representable rectangle, but inverted (e.g. fLeft will
* be max and right will be min).
@@ -506,7 +506,7 @@ struct SK_API SkRect {
fTop += dy;
fRight += dx;
fBottom += dy;
- }
+ }
void offset(const SkPoint& delta) {
this->offset(delta.fX, delta.fY);
@@ -562,7 +562,7 @@ struct SK_API SkRect {
* rectangle. If either rectangle is empty, do nothing and return false.
*/
bool intersect(const SkRect& a, const SkRect& b);
-
+
/**
* Return true if rectangles a and b are not empty and intersect.
*/
@@ -571,7 +571,7 @@ struct SK_API SkRect {
a.fLeft < b.fRight && b.fLeft < a.fRight &&
a.fTop < b.fBottom && b.fTop < a.fBottom;
}
-
+
/**
* Update this rectangle to enclose itself and the specified rectangle.
* If this rectangle is empty, just set it to the specified rectangle.
@@ -604,7 +604,7 @@ struct SK_API SkRect {
fTop = SkMinScalar(y, fTop);
fBottom = SkMaxScalar(y, fBottom);
}
-
+
/**
* Returns true if (p.fX,p.fY) is inside the rectangle, and the rectangle
* is not empty.
diff --git a/include/core/SkRegion.h b/include/core/SkRegion.h
index 2aab42385b..ab8f220a35 100644
--- a/include/core/SkRegion.h
+++ b/include/core/SkRegion.h
@@ -33,7 +33,7 @@ public:
enum {
kRunTypeSentinel = 0x7FFFFFFF
};
-
+
SkRegion();
SkRegion(const SkRegion&);
explicit SkRegion(const SkIRect&);
@@ -53,7 +53,7 @@ public:
bool operator!=(const SkRegion& other) const {
return !(*this == other);
}
-
+
/**
* Replace this region with the specified region, and return true if the
* resulting region is non-empty.
@@ -117,7 +117,7 @@ public:
* @return true if the resulting region is non-empty
*/
bool setRects(const SkIRect rects[], int count);
-
+
/**
* Set this region to the specified region, and return true if it is
* non-empty.
@@ -131,13 +131,13 @@ public:
* drawn by the path (with no antialiasing) with the specified clip.
*/
bool setPath(const SkPath&, const SkRegion& clip);
-
+
/**
* Returns true if the specified rectangle has a non-empty intersection
* with this region.
*/
bool intersects(const SkIRect&) const;
-
+
/**
* Returns true if the specified region has a non-empty intersection
* with this region.
@@ -185,14 +185,14 @@ public:
bool quickContains(int32_t left, int32_t top, int32_t right,
int32_t bottom) const {
SkASSERT(this->isEmpty() == fBounds.isEmpty()); // valid region
-
+
return left < right && top < bottom &&
fRunHead == SkRegion_gRectRunHeadPtr && // this->isRect()
/* fBounds.contains(left, top, right, bottom); */
fBounds.fLeft <= left && fBounds.fTop <= top &&
fBounds.fRight >= right && fBounds.fBottom >= bottom;
}
-
+
/**
* Return true if this region is empty, or if the specified rectangle does
* not intersect the region. Returning false is not a guarantee that they
@@ -236,14 +236,14 @@ public:
kReverseDifference_Op,
kReplace_Op //!< replace the dst region with the op region
};
-
+
/**
* Set this region to the result of applying the Op to this region and the
* specified rectangle: this = (this op rect).
* Return true if the resulting region is non-empty.
*/
bool op(const SkIRect& rect, Op op) { return this->op(*this, rect, op); }
-
+
/**
* Set this region to the result of applying the Op to this region and the
* specified rectangle: this = (this op rect).
@@ -254,7 +254,7 @@ public:
rect.set(left, top, right, bottom);
return this->op(*this, rect, op);
}
-
+
/**
* Set this region to the result of applying the Op to this region and the
* specified region: this = (this op rgn).
@@ -387,7 +387,7 @@ private:
friend class android::Region; // needed for marshalling efficiently
struct RunHead;
-
+
// allocate space for count runs
void allocateRuns(int count);
void allocateRuns(int count, int ySpanCount, int intervalCount);
@@ -397,21 +397,21 @@ private:
RunHead* fRunHead;
void freeRuns();
-
+
/**
* Return the runs from this region, consing up fake runs if the region
* is empty or a rect. In those 2 cases, we use tmpStorage to hold the
* run data.
*/
const RunType* getRuns(RunType tmpStorage[], int* intervals) const;
-
+
// This is called with runs[] that do not yet have their interval-count
// field set on each scanline. That is computed as part of this call
// (inside ComputeRunBounds).
bool setRuns(RunType runs[], int count);
int count_runtype_values(int* itop, int* ibot) const;
-
+
static void BuildRectRuns(const SkIRect& bounds,
RunType runs[kRectRegionRuns]);
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index 57d920c55e..4c20605cd7 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -309,7 +309,7 @@ public:
* need to create textures. The sampler parameter is necessary to set
* up matrix/tile modes/etc, and will eventually be removed.
*/
- virtual GrCustomStage* asNewCustomStage(GrContext* context,
+ virtual GrCustomStage* asNewCustomStage(GrContext* context,
GrSamplerState* sampler) const;
//////////////////////////////////////////////////////////////////////////
diff --git a/include/core/SkSize.h b/include/core/SkSize.h
index 12dbeae424..808583f3e8 100644
--- a/include/core/SkSize.h
+++ b/include/core/SkSize.h
@@ -36,15 +36,15 @@ template <typename T> struct SkTSize {
bool isEmpty() const {
return fWidth <= 0 || fHeight <= 0;
}
-
+
/** Set the width and height to 0 */
void setEmpty() {
fWidth = fHeight = 0;
}
-
- T width() const { return fWidth; }
- T height() const { return fHeight; }
-
+
+ T width() const { return fWidth; }
+ T height() const { return fHeight; }
+
/** If width or height is < 0, it is set to 0 */
void clampNegToZero() {
if (fWidth < 0) {
@@ -54,7 +54,7 @@ template <typename T> struct SkTSize {
fHeight = 0;
}
}
-
+
bool equals(T w, T h) const {
return fWidth == w && fHeight == h;
}
@@ -83,8 +83,8 @@ struct SkSize : public SkTSize<SkScalar> {
s.fHeight = h;
return s;
}
-
-
+
+
SkSize& operator=(const SkISize& src) {
this->set(SkIntToScalar(src.fWidth), SkIntToScalar(src.fHeight));
return *this;
diff --git a/include/core/SkStream.h b/include/core/SkStream.h
index f394deeb9c..08d087815b 100644
--- a/include/core/SkStream.h
+++ b/include/core/SkStream.h
@@ -40,7 +40,7 @@ public:
/** Return the total length of the stream.
*/
size_t getLength() { return this->read(NULL, 0); }
-
+
/** Skip the specified number of bytes, returning the actual number
of bytes that could be skipped.
*/
@@ -91,7 +91,7 @@ public:
virtual void flush();
// helpers
-
+
bool write8(U8CPU);
bool write16(U16CPU);
bool write32(uint32_t);
@@ -101,11 +101,11 @@ public:
bool writeBigDecAsText(int64_t, int minDigits = 0);
bool writeHexAsText(uint32_t, int minDigits = 0);
bool writeScalarAsText(SkScalar);
-
+
bool writeBool(bool v) { return this->write8(v); }
bool writeScalar(SkScalar);
bool writePackedUInt(size_t);
-
+
bool writeStream(SkStream* input, size_t length);
bool writeData(const SkData*);
@@ -161,15 +161,15 @@ public:
*/
SkFDStream(int fileDesc, bool closeWhenDone);
virtual ~SkFDStream();
-
+
/** Returns true if the current path could be opened.
*/
bool isValid() const { return fFD >= 0; }
-
+
virtual bool rewind() SK_OVERRIDE;
virtual size_t read(void* buffer, size_t size) SK_OVERRIDE;
virtual const char* getFileName() SK_OVERRIDE { return NULL; }
-
+
private:
int fFD;
bool fCloseWhenDone;
@@ -222,7 +222,7 @@ public:
const void* getAtPos();
size_t seek(size_t offset);
size_t peek() const { return fOffset; }
-
+
private:
SkData* fData;
size_t fOffset;
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h
index 884045fd39..8e407b92f6 100644
--- a/include/core/SkSurface.h
+++ b/include/core/SkSurface.h
@@ -79,13 +79,13 @@ public:
* 0.
*/
uint32_t generationID() const;
-
+
/**
* Call this if the contents have changed. This will (lazily) force a new
* value to be returned from generationID() when it is called next.
*/
void notifyContentChanged();
-
+
/**
* Return a canvas that will draw into this surface. This will always
* return the same canvas for a given surface, and is manged/owned by the
diff --git a/include/core/SkTArray.h b/include/core/SkTArray.h
index 01fc1421b3..3ca66793f4 100644
--- a/include/core/SkTArray.h
+++ b/include/core/SkTArray.h
@@ -60,13 +60,13 @@ public:
}
/**
- * Creates an empty array that will preallocate space for reserveCount
+ * Creates an empty array that will preallocate space for reserveCount
* elements.
*/
explicit SkTArray(int reserveCount) {
this->init(NULL, 0, NULL, reserveCount);
}
-
+
/**
* Copies one array to another. The new array will be heap allocated.
*/
@@ -75,7 +75,7 @@ public:
}
/**
- * Creates a SkTArray by copying contents of a standard C array. The new
+ * Creates a SkTArray by copying contents of a standard C array. The new
* array will be heap allocated. Be careful not to use this constructor
* when you really want the (void*, int) version.
*/
diff --git a/include/core/SkTDArray.h b/include/core/SkTDArray.h
index 2d7ec186a6..997a07022b 100644
--- a/include/core/SkTDArray.h
+++ b/include/core/SkTDArray.h
@@ -121,7 +121,7 @@ public:
SkASSERT(fReserve == 0 && fCount == 0);
}
}
-
+
void rewind() {
// same as setCount(0)
fCount = 0;
@@ -166,9 +166,9 @@ public:
}
return fArray + oldCount;
}
-
+
T* appendClear() {
- T* result = this->append();
+ T* result = this->append();
*result = 0;
return result;
}
diff --git a/include/core/SkTDLinkedList.h b/include/core/SkTDLinkedList.h
index a76ef96acd..7afb5b1b83 100644
--- a/include/core/SkTDLinkedList.h
+++ b/include/core/SkTDLinkedList.h
@@ -10,7 +10,7 @@
#include "SkTypes.h"
-/**
+/**
* Helper class to automatically initialize the doubly linked list
* created pointers.
*/
@@ -91,8 +91,8 @@ public:
#endif
}
- bool isEmpty() const {
- return NULL == fHead && NULL == fTail;
+ bool isEmpty() const {
+ return NULL == fHead && NULL == fTail;
}
class Iter {
diff --git a/include/core/SkTLazy.h b/include/core/SkTLazy.h
index 9cfaccbc7a..cf2d943829 100644
--- a/include/core/SkTLazy.h
+++ b/include/core/SkTLazy.h
@@ -76,13 +76,13 @@ public:
* false otherwise.
*/
bool isValid() const { return NULL != fPtr; }
-
+
/**
* Returns either NULL, or a copy of the object that was passed to
* set() or the constructor.
*/
T* get() const { SkASSERT(this->isValid()); return fPtr; }
-
+
private:
T* fPtr; // NULL or fStorage
char fStorage[sizeof(T)];
diff --git a/include/core/SkTSearch.h b/include/core/SkTSearch.h
index f6951da1d2..2541634d82 100644
--- a/include/core/SkTSearch.h
+++ b/include/core/SkTSearch.h
@@ -220,7 +220,7 @@ class SkAutoAsciiToLC {
public:
SkAutoAsciiToLC(const char str[], size_t len = (size_t)-1);
~SkAutoAsciiToLC();
-
+
const char* lc() const { return fLC; }
size_t length() const { return fLength; }
diff --git a/include/core/SkTemplates.h b/include/core/SkTemplates.h
index c152b31aac..e4c8bc44ca 100644
--- a/include/core/SkTemplates.h
+++ b/include/core/SkTemplates.h
@@ -141,7 +141,7 @@ public:
/** Return the array of T elements. Will be NULL if count == 0
*/
T* get() const { return fArray; }
-
+
/** Return the nth element in the array
*/
T& operator[](int index) const {
@@ -170,7 +170,7 @@ public:
}
fCount = count;
}
-
+
~SkAutoSTArray() {
if (fCount > N) {
delete[] fArray;
@@ -182,22 +182,22 @@ public:
}
}
}
-
+
/** Return the number of T elements in the array
*/
size_t count() const { return fCount; }
-
+
/** Return the array of T elements. Will be NULL if count == 0
*/
T* get() const { return fArray; }
-
+
/** Return the nth element in the array
*/
T& operator[](int index) const {
SkASSERT((unsigned)index < fCount);
return fArray[index];
}
-
+
private:
size_t fCount;
T* fArray;
diff --git a/include/core/SkThread.h b/include/core/SkThread.h
index 5b1fc1c213..4a2499a203 100644
--- a/include/core/SkThread.h
+++ b/include/core/SkThread.h
@@ -37,7 +37,7 @@ public:
SkASSERT(fMutex != NULL);
mutex.acquire();
}
-
+
SkAutoMutexAcquire(SkBaseMutex* mutex) : fMutex(mutex) {
if (mutex) {
mutex->acquire();
@@ -60,7 +60,7 @@ public:
fMutex = NULL;
}
}
-
+
private:
SkBaseMutex* fMutex;
};
diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h
index 73794dbcdc..78ec9f7cb6 100644
--- a/include/core/SkTypeface.h
+++ b/include/core/SkTypeface.h
@@ -64,7 +64,7 @@ public:
data. Will never return 0.
*/
SkFontID uniqueID() const { return fUniqueID; }
-
+
/** Return the uniqueID for the specified typeface. If the face is null,
resolve it to the default font and return its uniqueID. Will never
return 0.
@@ -142,25 +142,25 @@ public:
/** Return the number of tables in the font. */
int countTables() const;
-
+
/** Copy into tags[] (allocated by the caller) the list of table tags in
* the font, and return the number. This will be the same as CountTables()
* or 0 if an error occured. If tags == NULL, this only returns the count
* (the same as calling countTables()).
*/
int getTableTags(SkFontTableTag tags[]) const;
-
+
/** Given a table tag, return the size of its contents, or 0 if not present
*/
size_t getTableSize(SkFontTableTag) const;
-
+
/** Copy the contents of a table into data (allocated by the caller). Note
* that the contents of the table will be in their native endian order
* (which for most truetype tables is big endian). If the table tag is
* not found, or there is an error copying the data, then 0 is returned.
* If this happens, it is possible that some or all of the memory pointed
* to by data may have been written to, even though an error has occured.
- *
+ *
* @param fontID the font to copy the table from
* @param tag The table tag whose contents are to be copied
* @param offset The offset in bytes into the table's contents where the
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index 73bd429667..eb87181e7f 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -432,7 +432,7 @@ public:
* malloc a new block of the smaller size.
*/
kAlloc_OnShrink,
-
+
/**
* If the requested size is smaller than the current size, and the
* current block is dynamically allocated, just return the old
diff --git a/include/core/SkUnPreMultiply.h b/include/core/SkUnPreMultiply.h
index 70889189d5..4fa5d579e9 100644
--- a/include/core/SkUnPreMultiply.h
+++ b/include/core/SkUnPreMultiply.h
@@ -18,7 +18,7 @@
class SK_API SkUnPreMultiply {
public:
typedef uint32_t Scale;
-
+
// index this table with alpha [0..255]
static const Scale* GetScaleTable() {
return gTable;
@@ -28,15 +28,15 @@ public:
SkASSERT(alpha <= 255);
return gTable[alpha];
}
-
+
/** Usage:
-
+
const Scale* table = SkUnPreMultiply::GetScaleTable();
-
+
for (...) {
unsigned a = ...
SkUnPreMultiply::Scale scale = table[a];
-
+
red = SkUnPreMultiply::ApplyScale(scale, red);
...
// now red is unpremultiplied
@@ -46,9 +46,9 @@ public:
SkASSERT(component <= 255);
return (scale * component + (1 << 23)) >> 24;
}
-
+
static SkColor PMColorToColor(SkPMColor c);
-
+
private:
static const uint32_t gTable[256];
};
diff --git a/include/core/SkUnitMapper.h b/include/core/SkUnitMapper.h
index 47a4dad6c1..45bb987870 100644
--- a/include/core/SkUnitMapper.h
+++ b/include/core/SkUnitMapper.h
@@ -24,7 +24,7 @@ public:
/** Given a value in [0..0xFFFF], return a value in the same range.
*/
virtual uint16_t mapUnit16(uint16_t x) = 0;
-
+
protected:
SkUnitMapper(SkFlattenableReadBuffer& rb) : SkFlattenable(rb) {}
diff --git a/include/core/SkWriter32.h b/include/core/SkWriter32.h
index 793e815b3d..78cfb2b165 100644
--- a/include/core/SkWriter32.h
+++ b/include/core/SkWriter32.h
@@ -60,23 +60,23 @@ public:
this->writeInt(value);
return value;
}
-
+
void writeInt(int32_t value) {
*(int32_t*)this->reserve(sizeof(value)) = value;
}
-
+
void write8(int32_t value) {
*(int32_t*)this->reserve(sizeof(value)) = value & 0xFF;
}
-
+
void write16(int32_t value) {
*(int32_t*)this->reserve(sizeof(value)) = value & 0xFFFF;
}
-
+
void write32(int32_t value) {
*(int32_t*)this->reserve(sizeof(value)) = value;
}
-
+
void writePtr(void* ptr) {
// Since we "know" that we're always 4-byte aligned, we can tell the
// compiler that here, by assigning to an int32 ptr.
@@ -91,11 +91,11 @@ public:
void writeScalar(SkScalar value) {
*(SkScalar*)this->reserve(sizeof(value)) = value;
}
-
+
void writePoint(const SkPoint& pt) {
*(SkPoint*)this->reserve(sizeof(pt)) = pt;
}
-
+
void writeRect(const SkRect& rect) {
*(SkRect*)this->reserve(sizeof(rect)) = rect;
}
@@ -111,7 +111,7 @@ public:
SkASSERT(SkAlign4(size) == size);
matrix.writeToMemory(this->reserve(size));
}
-
+
void writeRegion(const SkRegion& rgn) {
size_t size = rgn.writeToMemory(NULL);
SkASSERT(SkAlign4(size) == size);
@@ -134,7 +134,7 @@ public:
// in the current block
memcpy(this->reserve(size), values, size);
}
-
+
void writePad(const void* src, size_t size);
/**
@@ -161,14 +161,14 @@ public:
// be a multiple of 4. This does not allocate any new space, so the returned
// address is only valid for 1 int.
uint32_t* peek32(size_t offset);
-
+
// copy into a single buffer (allocated by caller). Must be at least size()
void flatten(void* dst) const;
-
+
// read from the stream, and write up to length bytes. Return the actual
// number of bytes written.
size_t readFromStream(SkStream*, size_t length);
-
+
bool writeToStream(SkWStream*);
private:
@@ -196,7 +196,7 @@ private:
template <size_t SIZE> class SkSWriter32 : public SkWriter32 {
public:
SkSWriter32(size_t minSize) : SkWriter32(minSize, fData.fStorage, SIZE) {}
-
+
private:
union {
void* fPtrAlignment;
diff --git a/include/core/SkXfermode.h b/include/core/SkXfermode.h
index 2b7c11ea61..99d5a9cc12 100644
--- a/include/core/SkXfermode.h
+++ b/include/core/SkXfermode.h
@@ -101,11 +101,11 @@ public:
// all remaining modes are defined in the SVG Compositing standard
// http://www.w3.org/TR/2009/WD-SVGCompositing-20090430/
kPlus_Mode,
- kMultiply_Mode,
-
+ kMultiply_Mode,
+
// all above modes can be expressed as pair of src/dst Coeffs
- kCoeffModesCnt,
-
+ kCoeffModesCnt,
+
kScreen_Mode = kCoeffModesCnt,
kOverlay_Mode,
kDarken_Mode,
diff --git a/include/effects/Sk1DPathEffect.h b/include/effects/Sk1DPathEffect.h
index eafac36b89..9fad1efc18 100644
--- a/include/effects/Sk1DPathEffect.h
+++ b/include/effects/Sk1DPathEffect.h
@@ -42,10 +42,10 @@ public:
kTranslate_Style, // translate the shape to each position
kRotate_Style, // rotate the shape about its center
kMorph_Style, // transform each point, and turn lines into curves
-
+
kStyleCount
};
-
+
/** Dash by replicating the specified path.
@param path The path to replicate (dash)
@param advance The space between instances of path
@@ -66,7 +66,7 @@ protected:
// overrides from Sk1DPathEffect
virtual SkScalar begin(SkScalar contourLength) SK_OVERRIDE;
virtual SkScalar next(SkPath*, SkScalar distance, SkPathMeasure&) SK_OVERRIDE;
-
+
private:
SkPath fPath; // copied from constructor
SkScalar fAdvance; // copied from constructor
diff --git a/include/effects/Sk2DPathEffect.h b/include/effects/Sk2DPathEffect.h
index 724fb8f3a1..adc27e440f 100644
--- a/include/effects/Sk2DPathEffect.h
+++ b/include/effects/Sk2DPathEffect.h
@@ -65,7 +65,7 @@ public:
* the latice.
*/
SkPath2DPathEffect(const SkMatrix&, const SkPath&);
-
+
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPath2DPathEffect)
protected:
diff --git a/include/effects/SkBlurDrawLooper.h b/include/effects/SkBlurDrawLooper.h
index 2aff2f3ad2..0f400cddaf 100644
--- a/include/effects/SkBlurDrawLooper.h
+++ b/include/effects/SkBlurDrawLooper.h
@@ -25,8 +25,8 @@ class SK_API SkBlurDrawLooper : public SkDrawLooper {
public:
enum BlurFlags {
kNone_BlurFlag = 0x00,
- /**
- The blur layer's dx/dy/radius aren't affected by the canvas
+ /**
+ The blur layer's dx/dy/radius aren't affected by the canvas
transform.
*/
kIgnoreTransform_BlurFlag = 0x01,
@@ -36,7 +36,7 @@ public:
kAll_BlurFlag = 0x07
};
- SkBlurDrawLooper(SkScalar radius, SkScalar dx, SkScalar dy, SkColor color,
+ SkBlurDrawLooper(SkScalar radius, SkScalar dx, SkScalar dy, SkColor color,
uint32_t flags = kNone_BlurFlag);
virtual ~SkBlurDrawLooper();
@@ -55,7 +55,7 @@ private:
SkColorFilter* fColorFilter;
SkScalar fDx, fDy;
SkColor fBlurColor;
- uint32_t fBlurFlags;
+ uint32_t fBlurFlags;
enum State {
kBeforeEdge,
@@ -63,7 +63,7 @@ private:
kDone
};
State fState;
-
+
typedef SkDrawLooper INHERITED;
};
diff --git a/include/effects/SkBlurMaskFilter.h b/include/effects/SkBlurMaskFilter.h
index 9a1c9cecff..500e6d6998 100644
--- a/include/effects/SkBlurMaskFilter.h
+++ b/include/effects/SkBlurMaskFilter.h
@@ -41,7 +41,7 @@ public:
@param flags Flags to use - defaults to none
@return The new blur maskfilter
*/
- static SkMaskFilter* Create(SkScalar radius, BlurStyle style,
+ static SkMaskFilter* Create(SkScalar radius, BlurStyle style,
uint32_t flags = kNone_BlurFlag);
/** Create an emboss maskfilter
diff --git a/include/effects/SkColorFilterImageFilter.h b/include/effects/SkColorFilterImageFilter.h
index 2d07d5145e..73b3fa92ac 100755
--- a/include/effects/SkColorFilterImageFilter.h
+++ b/include/effects/SkColorFilterImageFilter.h
@@ -18,17 +18,17 @@ public:
virtual ~SkColorFilterImageFilter();
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorFilterImageFilter)
-
+
protected:
SkColorFilterImageFilter(SkFlattenableReadBuffer& buffer);
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
-
+
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
-
+
private:
SkColorFilter* fColorFilter;
-
+
typedef SkSingleInputImageFilter INHERITED;
};
diff --git a/include/effects/SkColorMatrix.h b/include/effects/SkColorMatrix.h
index ee383db656..a92f5882ea 100644
--- a/include/effects/SkColorMatrix.h
+++ b/include/effects/SkColorMatrix.h
@@ -15,7 +15,7 @@
class SkColorMatrix {
public:
SkScalar fMat[20];
-
+
void setIdentity();
void setScale(SkScalar rScale, SkScalar gScale, SkScalar bScale,
SkScalar aScale = SK_Scalar1);
diff --git a/include/effects/SkCornerPathEffect.h b/include/effects/SkCornerPathEffect.h
index 02fe6d9b9f..6c43b6c68c 100644
--- a/include/effects/SkCornerPathEffect.h
+++ b/include/effects/SkCornerPathEffect.h
@@ -37,7 +37,7 @@ protected:
private:
SkScalar fRadius;
-
+
typedef SkPathEffect INHERITED;
};
diff --git a/include/effects/SkDashPathEffect.h b/include/effects/SkDashPathEffect.h
index 87580aa37d..ddac9cfd4f 100644
--- a/include/effects/SkDashPathEffect.h
+++ b/include/effects/SkDashPathEffect.h
@@ -21,7 +21,7 @@ public:
/** intervals: array containing an even number of entries (>=2), with
the even indices specifying the length of "on" intervals, and the odd
indices specifying the length of "off" intervals.
- count: number of elements in the intervals array
+ count: number of elements in the intervals array
phase: offset into the intervals array (mod the sum of all of the
intervals).
@@ -51,7 +51,7 @@ public:
protected:
SkDashPathEffect(SkFlattenableReadBuffer&);
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
-
+
private:
SkScalar* fIntervals;
int32_t fCount;
diff --git a/include/effects/SkDiscretePathEffect.h b/include/effects/SkDiscretePathEffect.h
index 29fd3c5242..a2934def43 100644
--- a/include/effects/SkDiscretePathEffect.h
+++ b/include/effects/SkDiscretePathEffect.h
@@ -34,7 +34,7 @@ protected:
private:
SkScalar fSegLength, fPerterb;
-
+
typedef SkPathEffect INHERITED;
};
diff --git a/include/effects/SkEmbossMaskFilter.h b/include/effects/SkEmbossMaskFilter.h
index 24815a54d6..dc5f99ee0c 100644
--- a/include/effects/SkEmbossMaskFilter.h
+++ b/include/effects/SkEmbossMaskFilter.h
@@ -43,7 +43,7 @@ protected:
private:
Light fLight;
SkScalar fBlurRadius;
-
+
typedef SkMaskFilter INHERITED;
};
diff --git a/include/effects/SkGradientShader.h b/include/effects/SkGradientShader.h
index 748abd1801..443be93d67 100644
--- a/include/effects/SkGradientShader.h
+++ b/include/effects/SkGradientShader.h
@@ -34,7 +34,7 @@ public:
the the colors are distributed evenly between the start and end point.
If this is not null, the values must begin with 0, end with 1.0, and
intermediate values must be strictly increasing.
- @param count Must be >=2. The number of colors (and pos if not NULL) entries.
+ @param count Must be >=2. The number of colors (and pos if not NULL) entries.
@param mode The tiling mode
@param mapper May be NULL. Callback to modify the spread of the colors.
*/
@@ -108,7 +108,7 @@ public:
const SkScalar pos[], int count,
SkShader::TileMode mode,
SkUnitMapper* mapper = NULL);
-
+
/** Returns a shader that generates a sweep gradient given a center.
<p />
CreateSweep returns a shader with a reference count of 1.
diff --git a/include/effects/SkKernel33MaskFilter.h b/include/effects/SkKernel33MaskFilter.h
index bd47320529..cfe1265510 100644
--- a/include/effects/SkKernel33MaskFilter.h
+++ b/include/effects/SkKernel33MaskFilter.h
@@ -18,7 +18,7 @@ public:
: fPercent256(percent256) {}
virtual uint8_t computeValue(uint8_t* const* srcRows) = 0;
-
+
// overrides from SkMaskFilter
virtual SkMask::Format getFormat();
virtual bool filterMask(SkMask*, const SkMask&, const SkMatrix&, SkIPoint*);
@@ -29,7 +29,7 @@ protected:
private:
int fPercent256;
-
+
typedef SkMaskFilter INHERITED;
};
@@ -42,19 +42,19 @@ public:
memcpy(fKernel, coeff, 9 * sizeof(int));
fShift = shift;
}
-
+
// override from SkKernel33ProcMaskFilter
virtual uint8_t computeValue(uint8_t* const* srcRows);
-
+
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkKernel33MaskFilter)
-
+
private:
int fKernel[3][3];
int fShift;
SkKernel33MaskFilter(SkFlattenableReadBuffer& rb);
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
-
+
typedef SkKernel33ProcMaskFilter INHERITED;
};
diff --git a/include/effects/SkLayerDrawLooper.h b/include/effects/SkLayerDrawLooper.h
index d00c1e5bdd..d347de773f 100644
--- a/include/effects/SkLayerDrawLooper.h
+++ b/include/effects/SkLayerDrawLooper.h
@@ -35,7 +35,7 @@ public:
kShader_Bit = 1 << 4, //!< use this layer's shader
kColorFilter_Bit = 1 << 5, //!< use this layer's colorfilter
kXfermode_Bit = 1 << 6, //!< use this layer's xfermode
-
+
/**
* Use the layer's paint entirely, with these exceptions:
* - We never override the draw's paint's text_encoding, since that is
@@ -44,7 +44,7 @@ public:
* fFlagsMask and fColorMode.
*/
kEntirePaint_Bits = -1
-
+
};
typedef int32_t BitFlags;
@@ -93,22 +93,22 @@ public:
* This layer will draw with the original paint, ad the specified offset
*/
void addLayer(SkScalar dx, SkScalar dy);
-
+
/**
* This layer will with the original paint and no offset.
*/
void addLayer() { this->addLayer(0, 0); }
-
+
// overrides from SkDrawLooper
virtual void init(SkCanvas*);
virtual bool next(SkCanvas*, SkPaint* paint);
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLayerDrawLooper)
-
+
protected:
SkLayerDrawLooper(SkFlattenableReadBuffer&);
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
-
+
private:
struct Rec {
Rec* fNext;
@@ -129,7 +129,7 @@ private:
public:
MyRegistrar();
};
-
+
typedef SkDrawLooper INHERITED;
};
diff --git a/include/effects/SkLayerRasterizer.h b/include/effects/SkLayerRasterizer.h
index c51b174867..f3149e6de5 100644
--- a/include/effects/SkLayerRasterizer.h
+++ b/include/effects/SkLayerRasterizer.h
@@ -20,16 +20,16 @@ class SkLayerRasterizer : public SkRasterizer {
public:
SkLayerRasterizer();
virtual ~SkLayerRasterizer();
-
+
void addLayer(const SkPaint& paint) {
this->addLayer(paint, 0, 0);
}
- /** Add a new layer (above any previous layers) to the rasterizer.
- The layer will extract those fields that affect the mask from
- the specified paint, but will not retain a reference to the paint
- object itself, so it may be reused without danger of side-effects.
- */
+ /** Add a new layer (above any previous layers) to the rasterizer.
+ The layer will extract those fields that affect the mask from
+ the specified paint, but will not retain a reference to the paint
+ object itself, so it may be reused without danger of side-effects.
+ */
void addLayer(const SkPaint& paint, SkScalar dx, SkScalar dy);
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLayerRasterizer)
diff --git a/include/effects/SkPaintFlagsDrawFilter.h b/include/effects/SkPaintFlagsDrawFilter.h
index d8cc3ba657..775cb913b4 100644
--- a/include/effects/SkPaintFlagsDrawFilter.h
+++ b/include/effects/SkPaintFlagsDrawFilter.h
@@ -15,10 +15,10 @@
class SkPaintFlagsDrawFilter : public SkDrawFilter {
public:
SkPaintFlagsDrawFilter(uint32_t clearFlags, uint32_t setFlags);
-
+
// overrides
virtual void filter(SkPaint*, Type);
-
+
private:
uint16_t fClearFlags; // user specified
uint16_t fSetFlags; // user specified
diff --git a/include/effects/SkPorterDuff.h b/include/effects/SkPorterDuff.h
index 44d94f8e4d..8308f3c31b 100644
--- a/include/effects/SkPorterDuff.h
+++ b/include/effects/SkPorterDuff.h
@@ -55,19 +55,19 @@ public:
/** Return an SkXfermode object for the specified mode.
*/
static SkXfermode* CreateXfermode(Mode mode);
-
+
/** Return a function pointer to a routine that applies the specified
porter-duff transfer mode.
*/
static SkXfermodeProc GetXfermodeProc(Mode mode);
-
+
/** Return a function pointer to a routine that applies the specified
porter-duff transfer mode and srcColor to a 16bit device color. Note,
if the mode+srcColor might return a non-opaque color, then there is not
16bit proc, and this will return NULL.
*/
static SkXfermodeProc16 GetXfermodeProc16(Mode mode, SkColor srcColor);
-
+
/** If the specified xfermode advertises itself as one of the porterduff
modes (via SkXfermode::Coeff), return true and if not null, set mode
to the corresponding porterduff mode. If it is not recognized as a one,
diff --git a/include/effects/SkTableColorFilter.h b/include/effects/SkTableColorFilter.h
index 9fec68c25e..5714d072f2 100644
--- a/include/effects/SkTableColorFilter.h
+++ b/include/effects/SkTableColorFilter.h
@@ -18,7 +18,7 @@ public:
* the table is applied, and then the result is remultiplied.
*/
static SkColorFilter* Create(const uint8_t table[256]);
-
+
/**
* Create a table colorfilter, with a different table for each
* component [A, R, G, B]. If a given table is NULL, then it is
diff --git a/include/effects/SkTableMaskFilter.h b/include/effects/SkTableMaskFilter.h
index e2472d7d86..656eaba929 100644
--- a/include/effects/SkTableMaskFilter.h
+++ b/include/effects/SkTableMaskFilter.h
@@ -14,7 +14,7 @@
#include "SkScalar.h"
/** \class SkTableMaskFilter
-
+
Applies a table lookup on each of the alpha values in the mask.
Helper methods create some common tables (e.g. gamma, clipping)
*/
@@ -50,7 +50,7 @@ public:
// overrides from SkMaskFilter
virtual SkMask::Format getFormat();
virtual bool filterMask(SkMask*, const SkMask&, const SkMatrix&, SkIPoint*);
-
+
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTableMaskFilter)
protected:
@@ -59,7 +59,7 @@ protected:
private:
uint8_t fTable[256];
-
+
typedef SkMaskFilter INHERITED;
};
diff --git a/include/effects/SkTestImageFilters.h b/include/effects/SkTestImageFilters.h
index 55ee1d6258..4c96776a00 100755
--- a/include/effects/SkTestImageFilters.h
+++ b/include/effects/SkTestImageFilters.h
@@ -38,19 +38,19 @@ public:
virtual ~SkComposeImageFilter();
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeImageFilter)
-
+
protected:
SkComposeImageFilter(SkFlattenableReadBuffer& buffer);
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
-
+
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) SK_OVERRIDE;
-
+
private:
SkImageFilter* fOuter;
SkImageFilter* fInner;
-
+
typedef SkImageFilter INHERITED;
};
@@ -63,17 +63,17 @@ public:
SkMergeImageFilter(SkImageFilter* const filters[], int count,
const SkXfermode::Mode modes[] = NULL);
virtual ~SkMergeImageFilter();
-
+
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMergeImageFilter)
-
+
protected:
SkMergeImageFilter(SkFlattenableReadBuffer& buffer);
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
-
+
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) SK_OVERRIDE;
-
+
private:
SkImageFilter** fFilters;
uint8_t* fModes; // SkXfermode::Mode
@@ -85,7 +85,7 @@ private:
void initAlloc(int count, bool hasModes);
void init(SkImageFilter* const [], int count, const SkXfermode::Mode []);
-
+
typedef SkImageFilter INHERITED;
};
@@ -95,19 +95,19 @@ private:
class SkDownSampleImageFilter : public SkImageFilter {
public:
SkDownSampleImageFilter(SkScalar scale) : fScale(scale) {}
-
+
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDownSampleImageFilter)
-
+
protected:
SkDownSampleImageFilter(SkFlattenableReadBuffer& buffer);
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
-
+
virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
-
+
private:
SkScalar fScale;
-
+
typedef SkImageFilter INHERITED;
};
diff --git a/include/effects/SkTransparentShader.h b/include/effects/SkTransparentShader.h
index 531da74cb1..20bb51ac1a 100644
--- a/include/effects/SkTransparentShader.h
+++ b/include/effects/SkTransparentShader.h
@@ -31,7 +31,7 @@ private:
uint8_t fAlpha;
SkTransparentShader(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {}
-
+
typedef SkShader INHERITED;
};
diff --git a/include/gpu/GrAARectRenderer.h b/include/gpu/GrAARectRenderer.h
index fdaa30a47e..e8b9f158bc 100644
--- a/include/gpu/GrAARectRenderer.h
+++ b/include/gpu/GrAARectRenderer.h
@@ -23,7 +23,7 @@ class GrAARectRenderer : public GrRefCnt {
public:
SK_DECLARE_INST_COUNT(GrAARectRenderer)
- GrAARectRenderer()
+ GrAARectRenderer()
: fAAFillRectIndexBuffer(NULL)
, fAAStrokeRectIndexBuffer(NULL) {
}
diff --git a/include/gpu/GrCacheID.h b/include/gpu/GrCacheID.h
index e6f5f752d1..e593d7ee3f 100644
--- a/include/gpu/GrCacheID.h
+++ b/include/gpu/GrCacheID.h
@@ -45,18 +45,18 @@
* the resource-specific portion - which is filled in by each GrResource-
* derived class.
*
- * For the public portion each client of the cache makes up its own
- * unique-per-resource identifier (e.g., bitmap genID). A public ID of
- * 'kScratch_CacheID' indicates that the resource is a "scratch" resource.
- * When used to acquire a resource it indicates the cache user is
- * looking for a resource that matches a resource-subclass-specific set of
- * “dimensions” such as width, height, buffer size, or pixel config, but not
- * for particular resource contents (e.g., texel or vertex values). The public
- * IDs are unique within a private ID value but not necessarily across
+ * For the public portion each client of the cache makes up its own
+ * unique-per-resource identifier (e.g., bitmap genID). A public ID of
+ * 'kScratch_CacheID' indicates that the resource is a "scratch" resource.
+ * When used to acquire a resource it indicates the cache user is
+ * looking for a resource that matches a resource-subclass-specific set of
+ * “dimensions” such as width, height, buffer size, or pixel config, but not
+ * for particular resource contents (e.g., texel or vertex values). The public
+ * IDs are unique within a private ID value but not necessarily across
* private IDs.
*
* The domain portion identifies the cache client while the type field
- * indicates the resource type. When the public portion indicates that the
+ * indicates the resource type. When the public portion indicates that the
* resource is a scratch resource, the domain field should be kUnrestricted
* so that scratch resources can be recycled across domains.
*/
diff --git a/include/gpu/GrClipData.h b/include/gpu/GrClipData.h
index c9d934d96e..0cf702234c 100644
--- a/include/gpu/GrClipData.h
+++ b/include/gpu/GrClipData.h
@@ -19,7 +19,7 @@ class GrSurface;
/**
* GrClipData encapsulates the information required to construct the clip
* masks. 'fOrigin' is only non-zero when saveLayer has been called
- * with an offset bounding box. The clips in 'fClipStack' are in
+ * with an offset bounding box. The clips in 'fClipStack' are in
* device coordinates (i.e., they have been translated by -fOrigin w.r.t.
* the canvas' device coordinates).
*/
@@ -28,7 +28,7 @@ public:
const SkClipStack* fClipStack;
SkIPoint fOrigin;
- GrClipData()
+ GrClipData()
: fClipStack(NULL) {
fOrigin.setZero();
}
@@ -45,11 +45,11 @@ public:
return fClipStack == other.fClipStack;
}
- bool operator!=(const GrClipData& other) const {
- return !(*this == other);
+ bool operator!=(const GrClipData& other) const {
+ return !(*this == other);
}
- void getConservativeBounds(const GrSurface* surface,
+ void getConservativeBounds(const GrSurface* surface,
GrIRect* devResult,
bool* isIntersectionOfRects = NULL) const;
};
diff --git a/include/gpu/GrConfig.h b/include/gpu/GrConfig.h
index ffab237f41..327dbb44b1 100644
--- a/include/gpu/GrConfig.h
+++ b/include/gpu/GrConfig.h
@@ -118,7 +118,7 @@ typedef unsigned __int64 uint64_t;
#else
/*
* Include stdint.h with defines that trigger declaration of C99 limit/const
- * macros here before anyone else has a chance to include stdint.h without
+ * macros here before anyone else has a chance to include stdint.h without
* these.
*/
#define __STDC_LIMIT_MACROS
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 8dd81d9d8f..8ee326c974 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -15,7 +15,7 @@
#include "GrClipData.h"
// not strictly needed but requires WK change in LayerTextureUpdaterCanvas to
// remove.
-#include "GrRenderTarget.h"
+#include "GrRenderTarget.h"
#include "SkClipStack.h"
class GrAutoScratchTexture;
@@ -164,12 +164,12 @@ public:
* unlocked. Call must be balanced with an unlockTexture() call.
*
* Textures created by createAndLockTexture() hide the complications of
- * tiling non-power-of-two textures on APIs that don't support this (e.g.
+ * tiling non-power-of-two textures on APIs that don't support this (e.g.
* unextended GLES2). Tiling a npot texture created by lockScratchTexture on
* such an API will create gaps in the tiling pattern. This includes clamp
* mode. (This may be addressed in a future update.)
*/
- GrTexture* lockScratchTexture(const GrTextureDesc& desc,
+ GrTexture* lockScratchTexture(const GrTextureDesc& desc,
ScratchTexMatch match);
/**
@@ -223,7 +223,7 @@ public:
int getMaxTextureSize() const;
/**
- * Return the max width or height of a render target supported by the
+ * Return the max width or height of a render target supported by the
* current gpu
*/
int getMaxRenderTargetSize() const;
@@ -326,7 +326,7 @@ public:
* @param target if non-NULL, the render target to clear otherwise clear
* the current render target
*/
- void clear(const GrIRect* rect, GrColor color,
+ void clear(const GrIRect* rect, GrColor color,
GrRenderTarget* target = NULL);
/**
@@ -667,7 +667,7 @@ public:
class AutoClip : GrNoncopyable {
public:
- AutoClip(GrContext* context, const GrRect& newClipRect)
+ AutoClip(GrContext* context, const GrRect& newClipRect)
: fContext(context)
, fNewClipStack(newClipRect) {
fNewClipData.fClipStack = &fNewClipStack;
@@ -794,7 +794,7 @@ public:
, fTexture(NULL) {
this->set(context, desc, match);
}
-
+
~GrAutoScratchTexture() {
this->reset();
}
@@ -808,11 +808,11 @@ public:
/*
* When detaching a texture we do not unlock it in the texture cache but
- * we do set the returnToCache flag. In this way the texture remains
- * "locked" in the texture cache until it is freed and recycled in
- * GrTexture::internal_dispose. In reality, the texture has been removed
- * from the cache (because this is in AutoScratchTexture) and by not
- * calling unlockTexture we simply don't re-add it. It will be reattached
+ * we do set the returnToCache flag. In this way the texture remains
+ * "locked" in the texture cache until it is freed and recycled in
+ * GrTexture::internal_dispose. In reality, the texture has been removed
+ * from the cache (because this is in AutoScratchTexture) and by not
+ * calling unlockTexture we simply don't re-add it. It will be reattached
* in GrTexture::internal_dispose.
*
* Note that the caller is assumed to accept and manage the ref to the
diff --git a/include/gpu/GrContextFactory.h b/include/gpu/GrContextFactory.h
index 409c7fa15f..600bedae66 100644
--- a/include/gpu/GrContextFactory.h
+++ b/include/gpu/GrContextFactory.h
@@ -22,7 +22,7 @@
#include "SkTArray.h"
/**
- * This is a simple class that is useful in test apps that use different
+ * This is a simple class that is useful in test apps that use different
* GrContexts backed by different types of GL contexts. It manages creating the
* GL context and a GrContext that uses it. The GL/Gr contexts persist until the
* factory is destroyed (though the caller can always grab a ref on the returned
diff --git a/include/gpu/GrCustomStage.h b/include/gpu/GrCustomStage.h
index 0ac7a76205..fd5d7e00dc 100644
--- a/include/gpu/GrCustomStage.h
+++ b/include/gpu/GrCustomStage.h
@@ -38,7 +38,7 @@ private:
};
/** Provides custom vertex shader, fragment shader, uniform data for a
- particular stage of the Ganesh shading pipeline.
+ particular stage of the Ganesh shading pipeline.
Subclasses must have a function that produces a human-readable name:
static const char* Name();
GrCustomStage objects *must* be immutable: after being constructed,
@@ -71,7 +71,7 @@ public:
Example:
class MyCustomStage : public GrCustomStage {
...
- virtual const GrProgramStageFactory& getFactory() const
+ virtual const GrProgramStageFactory& getFactory() const
SK_OVERRIDE {
return GrTProgramStageFactory<MyCustomStage>::getInstance();
}
diff --git a/include/gpu/GrGlyph.h b/include/gpu/GrGlyph.h
index f79de7cb33..956404ec11 100644
--- a/include/gpu/GrGlyph.h
+++ b/include/gpu/GrGlyph.h
@@ -38,40 +38,40 @@ struct GrGlyph {
fBounds.set(bounds);
fAtlasLocation.set(0, 0);
}
-
+
void free() {
if (fPath) {
delete fPath;
fPath = NULL;
}
}
-
+
int width() const { return fBounds.width(); }
int height() const { return fBounds.height(); }
bool isEmpty() const { return fBounds.isEmpty(); }
uint16_t glyphID() const { return UnpackID(fPackedID); }
///////////////////////////////////////////////////////////////////////////
-
+
static inline unsigned ExtractSubPixelBitsFromFixed(GrFixed pos) {
// two most significant fraction bits from fixed-point
return (pos >> 14) & 3;
}
-
+
static inline PackedID Pack(uint16_t glyphID, GrFixed x, GrFixed y) {
x = ExtractSubPixelBitsFromFixed(x);
y = ExtractSubPixelBitsFromFixed(y);
return (x << 18) | (y << 16) | glyphID;
}
-
+
static inline GrFixed UnpackFixedX(PackedID packed) {
return ((packed >> 18) & 3) << 14;
}
-
+
static inline GrFixed UnpackFixedY(PackedID packed) {
return ((packed >> 16) & 3) << 14;
}
-
+
static inline uint16_t UnpackID(PackedID packed) {
return (uint16_t)packed;
}
diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h
index 90bd9a7c73..f9573bba93 100644
--- a/include/gpu/GrPaint.h
+++ b/include/gpu/GrPaint.h
@@ -151,7 +151,7 @@ public:
if (fColorMatrixEnabled) {
memcpy(fColorMatrix, paint.fColorMatrix, sizeof(fColorMatrix));
}
-
+
for (int i = 0; i < kMaxTextures; ++i) {
if (paint.isTextureStageEnabled(i)) {
fTextureSamplers[i] = paint.fTextureSamplers[i];
diff --git a/include/gpu/GrPoint.h b/include/gpu/GrPoint.h
index b32123b568..fd2c5a7cc1 100644
--- a/include/gpu/GrPoint.h
+++ b/include/gpu/GrPoint.h
@@ -20,7 +20,7 @@
struct GrIPoint16 {
int16_t fX, fY;
-
+
void set(intptr_t x, intptr_t y) {
fX = GrToS16(x);
fY = GrToS16(y);
diff --git a/include/gpu/GrRect.h b/include/gpu/GrRect.h
index 60a4773820..42ddd8e8fe 100644
--- a/include/gpu/GrRect.h
+++ b/include/gpu/GrRect.h
@@ -19,12 +19,12 @@ typedef SkRect GrRect;
struct GrIRect16 {
int16_t fLeft, fTop, fRight, fBottom;
-
+
int width() const { return fRight - fLeft; }
int height() const { return fBottom - fTop; }
int area() const { return this->width() * this->height(); }
bool isEmpty() const { return fLeft >= fRight || fTop >= fBottom; }
-
+
void set(const GrIRect& r) {
fLeft = SkToS16(r.fLeft);
fTop = SkToS16(r.fTop);
diff --git a/include/gpu/GrRenderTarget.h b/include/gpu/GrRenderTarget.h
index 33df8c6329..d6e8ee0be8 100644
--- a/include/gpu/GrRenderTarget.h
+++ b/include/gpu/GrRenderTarget.h
@@ -49,8 +49,8 @@ public:
* @return this render target.
*/
virtual GrRenderTarget* asRenderTarget() SK_OVERRIDE { return this; }
- virtual const GrRenderTarget* asRenderTarget() const SK_OVERRIDE {
- return this;
+ virtual const GrRenderTarget* asRenderTarget() const SK_OVERRIDE {
+ return this;
}
virtual bool readPixels(int left, int top, int width, int height,
@@ -132,7 +132,7 @@ public:
void resolve();
// a MSAA RT may require explicit resolving , it may auto-resolve (e.g. FBO
- // 0 in GL), or be unresolvable because the client didn't give us the
+ // 0 in GL), or be unresolvable because the client didn't give us the
// resolve destination.
enum ResolveType {
kCanResolve_ResolveType,
@@ -159,7 +159,7 @@ protected:
friend class GrTexture;
// When a texture unrefs an owned rendertarget this func
- // removes the back pointer. This could be called from
+ // removes the back pointer. This could be called from
// texture's destructor but would have to be done in derived
// classes. By the time of texture base destructor it has already
// lost its pointer to the rt.
diff --git a/include/gpu/GrSamplerState.h b/include/gpu/GrSamplerState.h
index f87b9b4e10..12c0937dfd 100644
--- a/include/gpu/GrSamplerState.h
+++ b/include/gpu/GrSamplerState.h
@@ -103,7 +103,7 @@ public:
bool operator ==(const GrSamplerState& s) const {
/* We must be bit-identical as far as the CustomStage;
there may be multiple CustomStages that will produce
- the same shader code and so are equivalent.
+ the same shader code and so are equivalent.
Can't take the address of fWrapX because it's :8 */
int bitwiseRegion = (intptr_t) &fCustomStage - (intptr_t) this;
GrAssert(sizeof(GrSamplerState) ==
@@ -157,7 +157,7 @@ public:
*
* After this call M' = M*m where M is the old matrix, m is the parameter
* to this function, and M' is the new matrix. (We consider points to
- * be column vectors so tex cood vector t is transformed by matrix X as
+ * be column vectors so tex cood vector t is transformed by matrix X as
* t' = X*t.)
*
* @param matrix the matrix used to modify the matrix.
diff --git a/include/gpu/GrTexture.h b/include/gpu/GrTexture.h
index c7bfb8c363..5f6d53522a 100644
--- a/include/gpu/GrTexture.h
+++ b/include/gpu/GrTexture.h
@@ -42,16 +42,16 @@ public:
void resetFlag(GrTextureFlags flags) {
fDesc.fFlags = fDesc.fFlags & ~flags;
}
- bool isSetFlag(GrTextureFlags flags) const {
- return 0 != (fDesc.fFlags & flags);
+ bool isSetFlag(GrTextureFlags flags) const {
+ return 0 != (fDesc.fFlags & flags);
}
/**
* Approximate number of bytes used by the texture
*/
virtual size_t sizeInBytes() const SK_OVERRIDE {
- return (size_t) fDesc.fWidth *
- fDesc.fHeight *
+ return (size_t) fDesc.fWidth *
+ fDesc.fHeight *
GrBytesPerPixel(fDesc.fConfig);
}
@@ -81,11 +81,11 @@ public:
* @return handle to render target or NULL if the texture is not a
* render target
*/
- virtual GrRenderTarget* asRenderTarget() SK_OVERRIDE {
- return fRenderTarget;
+ virtual GrRenderTarget* asRenderTarget() SK_OVERRIDE {
+ return fRenderTarget;
}
- virtual const GrRenderTarget* asRenderTarget() const SK_OVERRIDE {
- return fRenderTarget;
+ virtual const GrRenderTarget* asRenderTarget() const SK_OVERRIDE {
+ return fRenderTarget;
}
// GrTexture
@@ -93,13 +93,13 @@ public:
* Convert from texels to normalized texture coords for POT textures
* only.
*/
- GrFixed normalizeFixedX(GrFixed x) const {
+ GrFixed normalizeFixedX(GrFixed x) const {
GrAssert(GrIsPow2(fDesc.fWidth));
- return x >> fShiftFixedX;
+ return x >> fShiftFixedX;
}
- GrFixed normalizeFixedY(GrFixed y) const {
+ GrFixed normalizeFixedY(GrFixed y) const {
GrAssert(GrIsPow2(fDesc.fHeight));
- return y >> fShiftFixedY;
+ return y >> fShiftFixedY;
}
/**
@@ -117,7 +117,7 @@ public:
/**
* Call this when the state of the native API texture object is
- * altered directly, without being tracked by skia.
+ * altered directly, without being tracked by skia.
*/
virtual void invalidateCachedState() = 0;
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index 58f8968530..6888f5c33b 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -298,7 +298,7 @@ enum GrPixelConfig {
kGrPixelConfigCount
};
-// Aliases for pixel configs that match skia's byte order.
+// Aliases for pixel configs that match skia's byte order.
#ifndef SK_CPU_LENDIAN
#error "Skia gpu currently assumes little endian"
#endif
@@ -404,7 +404,7 @@ enum GrTextureFlags {
* Creates a texture that can be rendered to as a GrRenderTarget. Use
* GrTexture::asRenderTarget() to access.
*/
- kRenderTarget_GrTextureFlagBit = 0x1,
+ kRenderTarget_GrTextureFlagBit = 0x1,
/**
* By default all render targets have an associated stencil buffer that
* may be required for path filling. This flag overrides stencil buffer
@@ -435,7 +435,7 @@ enum {
* Describes a texture to be created.
*/
struct GrTextureDesc {
- GrTextureDesc()
+ GrTextureDesc()
: fFlags(kNone_GrTextureFlags)
, fWidth(0)
, fHeight(0)
@@ -464,7 +464,7 @@ struct GrTextureDesc {
};
/**
- * GrCacheData holds user-provided cache-specific data. It is used in
+ * GrCacheData holds user-provided cache-specific data. It is used in
* combination with the GrTextureDesc to construct a cache key for texture
* resources.
*/
@@ -484,7 +484,7 @@ struct GrCacheData {
// No default constructor is provided since, if you are creating one
// of these, you should definitely have a key (or be using the scratch
// key).
- GrCacheData(uint64_t key)
+ GrCacheData(uint64_t key)
: fClientCacheID(key)
, fResourceDomain(kScratch_ResourceDomain) {
}
@@ -600,8 +600,8 @@ typedef intptr_t GrPlatform3DObject;
/**
* Gr can wrap an existing texture created by the client with a GrTexture
* object. The client is responsible for ensuring that the texture lives at
- * least as long as the GrTexture object wrapping it. We require the client to
- * explicitly provide information about the texture, such as width, height,
+ * least as long as the GrTexture object wrapping it. We require the client to
+ * explicitly provide information about the texture, such as width, height,
* and pixel config, rather than querying the 3D APIfor these values. We expect
* these to be immutable even if the 3D API doesn't require this (OpenGL).
*
@@ -658,7 +658,7 @@ struct GrPlatformTextureDesc {
* Gr can wrap an existing render target created by the client in the 3D API
* with a GrRenderTarget object. The client is responsible for ensuring that the
* underlying 3D API object lives at least as long as the GrRenderTarget object
- * wrapping it. We require the client to explicitly provide information about
+ * wrapping it. We require the client to explicitly provide information about
* the target, such as width, height, and pixel config rather than querying the
* 3D API for these values. We expect these properties to be immutable even if
* the 3D API doesn't require this (OpenGL).
diff --git a/include/gpu/gl/GrGLConfig.h b/include/gpu/gl/GrGLConfig.h
index dd38283e25..20d9031264 100644
--- a/include/gpu/gl/GrGLConfig.h
+++ b/include/gpu/gl/GrGLConfig.h
@@ -49,7 +49,7 @@
* GR_GL_NO_CONSTANT_ATTRIBUTES: if this evaluates to true then the GL backend
* will use uniforms instead of attributes in all cases when there is not
* per-vertex data. This is important when the underlying GL implementation
- * doesn't actually support immediate style attribute values (e.g. when
+ * doesn't actually support immediate style attribute values (e.g. when
* the GL stream is converted to DX as in ANGLE on Chrome). Defaults to 0.
*
* GR_GL_USE_BUFFER_DATA_NULL_HINT: When specifing new data for a vertex/index
diff --git a/include/gpu/gl/GrGLFunctions.h b/include/gpu/gl/GrGLFunctions.h
index 626d904726..b0b3b16313 100644
--- a/include/gpu/gl/GrGLFunctions.h
+++ b/include/gpu/gl/GrGLFunctions.h
@@ -103,7 +103,7 @@ extern "C" {
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGetQueryObjecti64vProc)(GrGLuint id, GrGLenum pname, GrGLint64 *params);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGetQueryObjectivProc)(GrGLuint id, GrGLenum pname, GrGLint *params);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGetQueryObjectui64vProc)(GrGLuint id, GrGLenum pname, GrGLuint64 *params);
- typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGetQueryObjectuivProc)(GrGLuint id, GrGLenum pname, GrGLuint *params);
+ typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGetQueryObjectuivProc)(GrGLuint id, GrGLenum pname, GrGLuint *params);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGetRenderbufferParameterivProc)(GrGLenum target, GrGLenum pname, GrGLint* params);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGetShaderInfoLogProc)(GrGLuint shader, GrGLsizei bufsize, GrGLsizei* length, char* infolog);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLGetShaderivProc)(GrGLuint shader, GrGLenum pname, GrGLint* params);
@@ -160,7 +160,7 @@ extern "C" {
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLViewportProc)(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
// Experimental: Functions for GL_NV_path_rendering. These will be
- // alphabetized with the above functions once this is fully supported
+ // alphabetized with the above functions once this is fully supported
// (and functions we are unlikely to use will possibly be omitted).
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLMatrixModeProc)(GrGLenum);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLLoadIdentityProc)();
diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h
index c627b90fd6..e1ca40e391 100644
--- a/include/gpu/gl/GrGLInterface.h
+++ b/include/gpu/gl/GrGLInterface.h
@@ -45,7 +45,7 @@ enum GrGLBinding {
* whether the same GrGLInterface is returned or whether a new one is created
* at each call. Some platforms may not be able to use a single GrGLInterface
* because extension function ptrs vary across contexts. Note that GrGLInterface
- * is ref-counted. So if the same object is returned by multiple calls to
+ * is ref-counted. So if the same object is returned by multiple calls to
* GrGLDefaultInterface, each should bump the ref count.
*
* By defining GR_GL_PER_GL_CALL_IFACE_CALLBACK to 1 the client can specify a
@@ -60,7 +60,7 @@ const GrGLInterface* GrGLDefaultInterface();
/**
* Creates a GrGLInterface for a "native" GL context (e.g. WGL on windows,
* GLX on linux, AGL on Mac). On platforms that have context-specific function
- * pointers for GL extensions (e.g. windows) the returned interface is only
+ * pointers for GL extensions (e.g. windows) the returned interface is only
* valid for the context that was current at creation.
*/
const GrGLInterface* GrGLCreateNativeInterface();
@@ -86,7 +86,7 @@ const GrGLInterface* GrGLCreateANGLEInterface();
const GrGLInterface* GrGLCreateNullInterface();
/**
- * Creates a debugging GrGLInterface that doesn't draw anything. Used for
+ * Creates a debugging GrGLInterface that doesn't draw anything. Used for
* finding memory leaks and invalid memory accesses.
*/
const GrGLInterface* GrGLCreateDebugInterface();
@@ -255,7 +255,7 @@ public:
GLPtr<GrGLViewportProc> fViewport;
// Experimental: Functions for GL_NV_path_rendering. These will be
- // alphabetized with the above functions once this is fully supported
+ // alphabetized with the above functions once this is fully supported
// (and functions we are unlikely to use will possibly be omitted).
GLPtr<GrGLMatrixModeProc> fMatrixMode;
GLPtr<GrGLLoadIdentityProc> fLoadIdentity;
diff --git a/include/gpu/gl/SkGLContext.h b/include/gpu/gl/SkGLContext.h
index b8b6b6e85d..3f99eaeb6a 100644
--- a/include/gpu/gl/SkGLContext.h
+++ b/include/gpu/gl/SkGLContext.h
@@ -38,8 +38,8 @@ public:
protected:
/**
- * Subclass implements this to make a GL context. The returned GrGLInterface
- * should be populated with functions compatible with the context. The
+ * Subclass implements this to make a GL context. The returned GrGLInterface
+ * should be populated with functions compatible with the context. The
* format and size of backbuffers does not matter since an FBO will be
* created.
*/
diff --git a/include/images/SkFlipPixelRef.h b/include/images/SkFlipPixelRef.h
index 3d5c097077..ac437805d6 100644
--- a/include/images/SkFlipPixelRef.h
+++ b/include/images/SkFlipPixelRef.h
@@ -21,7 +21,7 @@ class SkFlipPixelRef : public SkPixelRef {
public:
SkFlipPixelRef(SkBitmap::Config, int width, int height);
virtual ~SkFlipPixelRef();
-
+
bool isDirty() const { return fFlipper.isDirty(); }
const SkRegion& dirtyRgn() const { return fFlipper.dirtyRgn(); }
@@ -41,7 +41,7 @@ protected:
SkFlipPixelRef(SkFlattenableReadBuffer&);
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
-
+
private:
void getFrontBack(const void** front, void** back) const {
if (front) {
@@ -61,7 +61,7 @@ private:
SkMutex fMutex;
SkPageFlipper fFlipper;
-
+
void* fStorage;
void* fPage0; // points into fStorage;
void* fPage1; // points into fStorage;
@@ -81,10 +81,10 @@ public:
fRef->endUpdate();
}
}
-
+
const SkBitmap& bitmap() const { return fBitmap; }
const SkRegion& dirty() const { return *fDirty; }
-
+
// optional. This gets automatically called in the destructor (only once)
void endUpdate() {
if (fRef) {
diff --git a/include/images/SkImageEncoder.h b/include/images/SkImageEncoder.h
index 907e28b9de..5e350d46ff 100644
--- a/include/images/SkImageEncoder.h
+++ b/include/images/SkImageEncoder.h
@@ -22,7 +22,7 @@ public:
static SkImageEncoder* Create(Type);
virtual ~SkImageEncoder();
-
+
/* Quality ranges from 0..100 */
enum {
kDefaultQuality = 80
diff --git a/include/images/SkImageRef.h b/include/images/SkImageRef.h
index bec3527acc..dcc4c0e240 100644
--- a/include/images/SkImageRef.h
+++ b/include/images/SkImageRef.h
@@ -27,7 +27,7 @@ public:
since it may be accessed from another thread, the caller must ensure
that this imageref is the only owner of the stream. i.e. - sole
ownership of the stream object is transferred to this imageref object.
-
+
@param stream The stream containing the encoded image data. This may be
retained (by calling ref()), so the caller should not
explicitly delete it.
@@ -40,22 +40,22 @@ public:
/** this value is passed onto the decoder. Default is true
*/
void setDitherImage(bool dither) { fDoDither = dither; }
-
+
/** Return true if the image can be decoded. If so, and bitmap is non-null,
call its setConfig() with the corresponding values, but explicitly will
not set its pixels or colortable. Use SkPixelRef::lockPixels() for that.
-
+
If there has been an error decoding the bitmap, this will return false
and ignore the bitmap parameter.
*/
bool getInfo(SkBitmap* bm);
-
+
/** Return true if the image can be decoded and is opaque. Calling this
method will decode and set the pixels in the specified bitmap and
sets the isOpaque flag.
*/
bool isOpaque(SkBitmap* bm);
-
+
SkImageDecoderFactory* getDecoderFactory() const { return fFactory; }
// returns the factory parameter
SkImageDecoderFactory* setDecoderFactory(SkImageDecoderFactory*);
@@ -74,13 +74,13 @@ protected:
virtual void* onLockPixels(SkColorTable**);
// override this in your subclass to clean up when we're unlocking pixels
virtual void onUnlockPixels();
-
+
SkImageRef(SkFlattenableReadBuffer&);
virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
SkBitmap fBitmap;
-private:
+private:
SkStream* setStream(SkStream*);
// called with mutex already held. returns true if the bitmap is in the
// requested state (or further, i.e. has pixels)
@@ -92,12 +92,12 @@ private:
int fSampleSize;
bool fDoDither;
bool fErrorInDecoding;
-
+
friend class SkImageRefPool;
-
- SkImageRef* fPrev, *fNext;
+
+ SkImageRef* fPrev, *fNext;
size_t ramUsed() const;
-
+
typedef SkPixelRef INHERITED;
};
diff --git a/include/images/SkImageRef_GlobalPool.h b/include/images/SkImageRef_GlobalPool.h
index 03c23673c6..914b0eb435 100644
--- a/include/images/SkImageRef_GlobalPool.h
+++ b/include/images/SkImageRef_GlobalPool.h
@@ -17,7 +17,7 @@ public:
// if pool is null, use the global pool
SkImageRef_GlobalPool(SkStream*, SkBitmap::Config, int sampleSize = 1);
virtual ~SkImageRef_GlobalPool();
-
+
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageRef_GlobalPool)
// API to control the global pool
@@ -25,15 +25,15 @@ public:
/** Return the amount specified as the budget for the cache (in bytes).
*/
static size_t GetRAMBudget();
-
+
/** Set a new budget value for the cache.
*/
static void SetRAMBudget(size_t);
-
+
/** Return how much ram is currently in use by the global cache.
*/
static size_t GetRAMUsed();
-
+
/** Free up (approximately) enough such that the amount used by the cache
is <= the specified amount. Since some images may be "in use", the
amount actually freed may not always result in a ram usage value <=
@@ -42,16 +42,16 @@ public:
amount.
*/
static void SetRAMUsed(size_t usageInBytes);
-
+
static void DumpPool();
protected:
virtual bool onDecode(SkImageDecoder* codec, SkStream* stream,
SkBitmap* bitmap, SkBitmap::Config config,
SkImageDecoder::Mode mode);
-
+
virtual void onUnlockPixels();
-
+
SkImageRef_GlobalPool(SkFlattenableReadBuffer&);
private:
diff --git a/include/images/SkMovie.h b/include/images/SkMovie.h
index cecad29a31..f32d6094b2 100644
--- a/include/images/SkMovie.h
+++ b/include/images/SkMovie.h
@@ -40,7 +40,7 @@ public:
int width();
int height();
int isOpaque();
-
+
/** Specify the time code (between 0...duration) to sample a bitmap
from the movie. Returns true if this time code generated a different
bitmap/frame from the previous state (i.e. true means you need to
@@ -50,7 +50,7 @@ public:
// return the right bitmap for the current time code
const SkBitmap& bitmap();
-
+
protected:
struct Info {
SkMSec fDuration;
@@ -71,7 +71,7 @@ private:
SkMSec fCurrTime;
SkBitmap fBitmap;
bool fNeedBitmap;
-
+
void ensureInfo();
typedef SkRefCnt INHERITED;
diff --git a/include/images/SkPageFlipper.h b/include/images/SkPageFlipper.h
index 1a188565aa..91a1e9de6c 100644
--- a/include/images/SkPageFlipper.h
+++ b/include/images/SkPageFlipper.h
@@ -25,7 +25,7 @@ class SkPageFlipper {
public:
SkPageFlipper();
SkPageFlipper(int width, int height);
-
+
int width() const { return fWidth; }
int height() const { return fHeight; }
@@ -44,7 +44,7 @@ public:
region (provided by the caller) is the area that should be copied from
the front page to the back page (will not intersect with the returned
inval region.
-
+
Once this is called, the two internal regions are swapped, so the *new*
back inval region is ready to receive new inval calls.
*/
diff --git a/include/ports/SkHarfBuzzFont.h b/include/ports/SkHarfBuzzFont.h
index 66c5534628..22749af092 100644
--- a/include/ports/SkHarfBuzzFont.h
+++ b/include/ports/SkHarfBuzzFont.h
@@ -29,7 +29,7 @@ public:
Color information (e.g. color, xfermode, shader, etc.) are not required.
*/
virtual void setupPaint(SkPaint*) const = 0;
-
+
/** Implementation of HB_GetFontTableFunc, using SkHarfBuzzFont* as
the first parameter.
*/
diff --git a/include/ports/SkStream_Win.h b/include/ports/SkStream_Win.h
index 849636005d..d85da8ba44 100644
--- a/include/ports/SkStream_Win.h
+++ b/include/ports/SkStream_Win.h
@@ -34,7 +34,7 @@ public:
// overrides
virtual bool rewind();
virtual size_t read(void* buffer, size_t size);
-
+
private:
SkString fURL;
HINTERNET fConnection;
diff --git a/include/svg/SkSVGBase.h b/include/svg/SkSVGBase.h
index 234ba8b443..a512eabed1 100644
--- a/include/svg/SkSVGBase.h
+++ b/include/svg/SkSVGBase.h
@@ -17,7 +17,7 @@ class SkSVGParser;
class SkSVGBase {
public:
virtual ~SkSVGBase();
- virtual void addAttribute(SkSVGParser& parser, int attrIndex,
+ virtual void addAttribute(SkSVGParser& parser, int attrIndex,
const char* attrValue, size_t attrLength);
virtual int getAttributes(const SkSVGAttribute** attrPtr) = 0;
};
diff --git a/include/svg/SkSVGPaintState.h b/include/svg/SkSVGPaintState.h
index 76c5daf557..211e9cfce4 100644
--- a/include/svg/SkSVGPaintState.h
+++ b/include/svg/SkSVGPaintState.h
@@ -42,10 +42,10 @@ public:
};
SkSVGPaint();
- virtual void addAttribute(SkSVGParser& parser, int attrIndex,
+ virtual void addAttribute(SkSVGParser& parser, int attrIndex,
const char* attrValue, size_t attrLength);
bool flush(SkSVGParser& , bool isFlushable, bool isDef);
- virtual int getAttributes(const SkSVGAttribute** attrPtr);
+ virtual int getAttributes(const SkSVGAttribute** attrPtr);
static void Push(SkSVGPaint** head, SkSVGPaint* add);
static void Pop(SkSVGPaint** head);
SkString* operator[](int index);
diff --git a/include/svg/SkSVGParser.h b/include/svg/SkSVGParser.h
index a58729de80..c2f9112e64 100644
--- a/include/svg/SkSVGParser.h
+++ b/include/svg/SkSVGParser.h
@@ -55,7 +55,7 @@ private:
static void Delete(SkTDArray<SkSVGElement*>& fChildren);
static SkSVGTypes GetType(const char name[], size_t len);
SkSVGPaint* fHead;
- SkSVGPaint fEmptyPaint;
+ SkSVGPaint fEmptyPaint;
SkSVGPaint fLastFlush;
SkString fLastColor;
SkMatrix fLastTransform;
diff --git a/include/svg/SkSVGTypes.h b/include/svg/SkSVGTypes.h
index 28830a134c..b13bc6e4fc 100644
--- a/include/svg/SkSVGTypes.h
+++ b/include/svg/SkSVGTypes.h
@@ -33,7 +33,7 @@ enum SkSVGTypes {
SkSVGType_Symbol,
SkSVGType_Text,
SkSVGType_Tspan,
- SkSVGType_Unknown,
+ SkSVGType_Unknown,
SkSVGType_Use
};
diff --git a/include/text/SkTextLayout.h b/include/text/SkTextLayout.h
index 3b123343e8..7d0ffe72de 100644
--- a/include/text/SkTextLayout.h
+++ b/include/text/SkTextLayout.h
@@ -22,7 +22,7 @@ public:
const SkPaint& paint() const { return fPaint; }
SkPaint& paint() { return fPaint; }
-
+
// todo: bidi-override, language
private:
diff --git a/include/utils/SkBoundaryPatch.h b/include/utils/SkBoundaryPatch.h
index 7997cf8abe..89060a65da 100644
--- a/include/utils/SkBoundaryPatch.h
+++ b/include/utils/SkBoundaryPatch.h
@@ -49,7 +49,7 @@ private:
class SkLineBoundary : public SkBoundary {
public:
SkPoint fPts[4];
-
+
// override
virtual SkPoint eval(Edge, SkScalar);
};
@@ -58,7 +58,7 @@ class SkCubicBoundary : public SkBoundary {
public:
// the caller sets the first 12 entries. The 13th is used by the impl.
SkPoint fPts[13];
-
+
// override
virtual SkPoint eval(Edge, SkScalar);
};
diff --git a/include/utils/SkCamera.h b/include/utils/SkCamera.h
index d3bddaa2af..6527c32d6e 100644
--- a/include/utils/SkCamera.h
+++ b/include/utils/SkCamera.h
@@ -55,7 +55,7 @@ typedef SkPoint3D SkVector3D;
struct SkMatrix3D {
SkScalar fMat[3][4];
-
+
void reset();
void setRow(int row, SkScalar a, SkScalar b, SkScalar c, SkScalar d = 0)
@@ -71,7 +71,7 @@ struct SkMatrix3D {
void setRotateY(SkScalar deg);
void setRotateZ(SkScalar deg);
void setTranslate(SkScalar x, SkScalar y, SkScalar z);
-
+
void preRotateX(SkScalar deg);
void preRotateY(SkScalar deg);
void preRotateZ(SkScalar deg);
@@ -113,7 +113,7 @@ private:
public: // make public for SkDraw3D for now
SkVector3D fU, fV;
SkPoint3D fOrigin;
-
+
friend class SkCamera3D;
};
@@ -161,7 +161,7 @@ public:
void applyToCanvas(SkCanvas*) const;
SkScalar dotWithNormal(SkScalar dx, SkScalar dy, SkScalar dz) const;
-
+
private:
struct Rec {
Rec* fNext;
diff --git a/include/utils/SkCullPoints.h b/include/utils/SkCullPoints.h
index 5458b29781..fafa0fc085 100644
--- a/include/utils/SkCullPoints.h
+++ b/include/utils/SkCullPoints.h
@@ -16,13 +16,13 @@ class SkCullPoints {
public:
SkCullPoints();
SkCullPoints(const SkIRect& r);
-
+
void reset(const SkIRect& r);
-
+
/** Start a contour at (x,y). Follow this with call(s) to lineTo(...)
*/
void moveTo(int x, int y);
-
+
enum LineToResult {
kNo_Result, //!< line segment was completely clipped out
kLineTo_Result, //!< path.lineTo(pts[1]);
@@ -37,7 +37,7 @@ private:
SkIPoint fAsQuad[4]; // cache of fR as 4 points
SkIPoint fPrevPt; // private state
LineToResult fPrevResult; // private state
-
+
bool sect_test(int x0, int y0, int x1, int y1) const;
};
@@ -56,7 +56,7 @@ public:
SkCullPointsPath(const SkIRect& r, SkPath* dst);
void reset(const SkIRect& r, SkPath* dst);
-
+
void moveTo(int x, int y);
void lineTo(int x, int y);
diff --git a/include/utils/SkDeferredCanvas.h b/include/utils/SkDeferredCanvas.h
index ff3235136d..8779df96b2 100644
--- a/include/utils/SkDeferredCanvas.h
+++ b/include/utils/SkDeferredCanvas.h
@@ -47,7 +47,7 @@ public:
/**
* Specify a NotificationClient to be used by this canvas. Calling
- * setNotificationClient will release the previously set
+ * setNotificationClient will release the previously set
* NotificationClient, if any. SkDeferredCanvas does not take ownership
* of the notification client. Therefore user code is resposible
* for its destruction. The notification client must be unregistered
@@ -75,7 +75,7 @@ public:
bool isDeferredDrawing() const;
/**
- * Returns true if the canvas contains a fresh frame. A frame is
+ * Returns true if the canvas contains a fresh frame. A frame is
* considered fresh when its content do not depend on the contents
* of the previous frame. For example, if a canvas is cleared before
* drawing each frame, the frames will all be considered fresh.
@@ -181,7 +181,7 @@ public:
/**
* Called after a recording a draw command if additional memory
* had to be allocated for recording.
- * @param newAllocatedStorage same value as would be returned by
+ * @param newAllocatedStorage same value as would be returned by
* storageAllocatedForRecording(), for convenience.
*/
virtual void storageAllocatedForRecordingChanged(
@@ -191,7 +191,7 @@ public:
* Called after pending draw commands have been flushed
*/
virtual void flushedDrawCommands() {}
-
+
private:
typedef SkRefCnt INHERITED;
};
diff --git a/include/utils/SkDumpCanvas.h b/include/utils/SkDumpCanvas.h
index 36c27caebf..bae84c6e84 100644
--- a/include/utils/SkDumpCanvas.h
+++ b/include/utils/SkDumpCanvas.h
@@ -53,7 +53,7 @@ public:
virtual void dump(SkDumpCanvas*, SkDumpCanvas::Verb, const char str[],
const SkPaint*) = 0;
-
+
private:
typedef SkRefCnt INHERITED;
};
diff --git a/include/utils/SkJSON.h b/include/utils/SkJSON.h
index 5268af53cd..c601fa89b5 100644
--- a/include/utils/SkJSON.h
+++ b/include/utils/SkJSON.h
@@ -23,9 +23,9 @@ public:
kFloat,
kBool,
};
-
+
class Array;
-
+
class Object {
private:
struct Slot;
@@ -42,7 +42,7 @@ public:
* not be null.
*/
void addObject(const char name[], Object* value);
-
+
/**
* Create a new slot with the specified name and value. The name
* parameter is copied, but ownership of the Array parameter is
@@ -50,26 +50,26 @@ public:
* not be null.
*/
void addArray(const char name[], Array* value);
-
+
/**
* Create a new slot with the specified name and value. Both parameters
* are copied. The value parameter may be null, but the name must
* not be null.
*/
void addString(const char name[], const char value[]);
-
+
/**
* Create a new slot with the specified name and value. The name
* parameter is copied, and must not be null.
*/
void addInt(const char name[], int32_t value);
-
+
/**
* Create a new slot with the specified name and value. The name
* parameter is copied, and must not be null.
*/
void addFloat(const char name[], float value);
-
+
/**
* Create a new slot with the specified name and value. The name
* parameter is copied, and must not be null.
@@ -108,7 +108,7 @@ public:
class Iter {
public:
Iter(const Object&);
-
+
/**
* Returns true when there are no more entries in the iterator.
* In this case, no other methods should be called.
@@ -126,43 +126,43 @@ public:
* if done() returns false.
*/
Type type() const;
-
+
/**
* Returns the name of the current element. Should only be called
* if done() returns false.
*/
const char* name() const;
-
+
/**
* Returns the type of the current element. Should only be called
* if done() returns false and type() returns kObject.
*/
Object* objectValue() const;
-
+
/**
* Returns the type of the current element. Should only be called
* if done() returns false and type() returns kArray.
*/
Array* arrayValue() const;
-
+
/**
* Returns the type of the current element. Should only be called
* if done() returns false and type() returns kString.
*/
const char* stringValue() const;
-
+
/**
* Returns the type of the current element. Should only be called
* if done() returns false and type() returns kInt.
*/
int32_t intValue() const;
-
+
/**
* Returns the type of the current element. Should only be called
* if done() returns false and type() returns kFloat.
*/
float floatValue() const;
-
+
/**
* Returns the type of the current element. Should only be called
* if done() returns false and type() returns kBool.
@@ -176,14 +176,14 @@ public:
private:
Slot* fHead;
Slot* fTail;
-
+
const Slot* findSlot(const char name[], Type) const;
Slot* addSlot(Slot*);
void dumpLevel(int level) const;
-
+
friend class Array;
};
-
+
class Array {
public:
/**
@@ -197,22 +197,22 @@ public:
* values.
*/
Array(const int32_t values[], int count);
-
+
/**
* Creates an array of floats, initialized by copying the specified
* values.
*/
Array(const float values[], int count);
-
+
/**
* Creates an array of bools, initialized by copying the specified
* values.
*/
Array(const bool values[], int count);
-
+
Array(const Array&);
~Array();
-
+
int count() const { return fCount; }
Type type() const { return fType; }
@@ -222,7 +222,7 @@ public:
* Should only be called if the Array's type is kObject.
*/
void setObject(int index, Object*);
-
+
/**
* Replace the element at the specified index with the specified
* Array (which may be null). Ownership of the Array is transferred.
@@ -274,10 +274,10 @@ public:
float* fFloats;
bool* fBools;
} fArray;
-
+
void init(Type, int count, const void* src);
void dumpLevel(int level) const;
-
+
friend class Object;
};
};
diff --git a/include/utils/SkMeshUtils.h b/include/utils/SkMeshUtils.h
index c7cdeca4a8..564df67a8e 100644
--- a/include/utils/SkMeshUtils.h
+++ b/include/utils/SkMeshUtils.h
@@ -19,7 +19,7 @@ class SkMeshIndices {
public:
SkMeshIndices();
~SkMeshIndices();
-
+
bool init(int texW, int texH, int rows, int cols) {
return this->init(NULL, NULL, texW, texH, rows, cols);
}
diff --git a/include/utils/SkNinePatch.h b/include/utils/SkNinePatch.h
index b0ea46b19e..4d8788b285 100644
--- a/include/utils/SkNinePatch.h
+++ b/include/utils/SkNinePatch.h
@@ -22,7 +22,7 @@ public:
static void DrawNine(SkCanvas* canvas, const SkRect& dst,
const SkBitmap& bitmap, const SkIRect& margins,
const SkPaint* paint = NULL);
-
+
static void DrawMesh(SkCanvas* canvas, const SkRect& dst,
const SkBitmap& bitmap,
const int32_t xDivs[], int numXDivs,
diff --git a/include/utils/ios/SkStream_NSData.h b/include/utils/ios/SkStream_NSData.h
index 0829a4f26f..8e6f06452d 100755
--- a/include/utils/ios/SkStream_NSData.h
+++ b/include/utils/ios/SkStream_NSData.h
@@ -30,7 +30,7 @@ class SkStream_NSData : public SkMemoryStream {
public:
SkStream_NSData(NSData* data);
virtual ~SkStream_NSData();
-
+
static SkStream_NSData* CreateFromResource(const char name[],
const char suffix[]);
diff --git a/include/utils/win/SkIStream.h b/include/utils/win/SkIStream.h
index b7d09493da..e4e045c988 100644
--- a/include/utils/win/SkIStream.h
+++ b/include/utils/win/SkIStream.h
@@ -46,24 +46,24 @@ public:
// IStream Interface
public:
virtual HRESULT STDMETHODCALLTYPE SetSize(ULARGE_INTEGER);
-
+
virtual HRESULT STDMETHODCALLTYPE CopyTo(IStream*
, ULARGE_INTEGER
, ULARGE_INTEGER*
, ULARGE_INTEGER*);
-
+
virtual HRESULT STDMETHODCALLTYPE Commit(DWORD);
-
+
virtual HRESULT STDMETHODCALLTYPE Revert(void);
-
+
virtual HRESULT STDMETHODCALLTYPE LockRegion(ULARGE_INTEGER
, ULARGE_INTEGER
, DWORD);
-
+
virtual HRESULT STDMETHODCALLTYPE UnlockRegion(ULARGE_INTEGER
, ULARGE_INTEGER
, DWORD);
-
+
virtual HRESULT STDMETHODCALLTYPE Clone(IStream **);
virtual HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER liDistanceToMove
diff --git a/include/utils/win/SkTScopedComPtr.h b/include/utils/win/SkTScopedComPtr.h
index 14aace5440..85c314a97a 100644
--- a/include/utils/win/SkTScopedComPtr.h
+++ b/include/utils/win/SkTScopedComPtr.h
@@ -47,13 +47,13 @@ public:
this->fPtr = NULL;
}
}
-
+
void swap(SkTScopedComPtr<T>& that) {
T* temp = this->fPtr;
this->fPtr = that.fPtr;
that.fPtr = temp;
}
-
+
T* release() {
T* temp = this->fPtr;
this->fPtr = NULL;
diff --git a/include/views/SkEvent.h b/include/views/SkEvent.h
index b3a07e9551..e11c1573d2 100644
--- a/include/views/SkEvent.h
+++ b/include/views/SkEvent.h
@@ -105,7 +105,7 @@ public:
fTargetProc = proc;
return this;
}
-
+
/**
* Return the event's unnamed 32bit field. Default value is 0
*/
@@ -195,7 +195,7 @@ public:
void post() {
return this->postDelay(0);
}
-
+
/**
* Post to the event queue using the event's targetID or target-proc and
* the specifed millisecond delay.
@@ -204,7 +204,7 @@ public:
* the event queue. It cannot be allocated on the stack or in a global.
*/
void postDelay(SkMSec delay);
-
+
/**
* Post to the event queue using the event's targetID or target-proc.
* The event will be delivered no sooner than the specified millisecond
diff --git a/include/views/SkKey.h b/include/views/SkKey.h
index 4db3108d4c..a019c28115 100644
--- a/include/views/SkKey.h
+++ b/include/views/SkKey.h
@@ -13,9 +13,9 @@
#include "SkTypes.h"
enum SkKey {
- //reordering these to match android.app.KeyEvent
+ //reordering these to match android.app.KeyEvent
kNONE_SkKey, //corresponds to android's UNKNOWN
-
+
kLeftSoftKey_SkKey,
kRightSoftKey_SkKey,
@@ -23,7 +23,7 @@ enum SkKey {
kBack_SkKey, //!< (CLR)
kSend_SkKey, //!< the green (talk) key
kEnd_SkKey, //!< the red key
-
+
k0_SkKey,
k1_SkKey,
k2_SkKey,
diff --git a/include/views/SkOSMenu.h b/include/views/SkOSMenu.h
index 0c4a619efa..3e5ee43920 100644
--- a/include/views/SkOSMenu.h
+++ b/include/views/SkOSMenu.h
@@ -17,9 +17,9 @@ class SkOSMenu {
public:
explicit SkOSMenu(const char title[] = "");
~SkOSMenu();
-
+
/**
- * Each of these (except action) has an associated value, which is stored in
+ * Each of these (except action) has an associated value, which is stored in
* the event payload for the item.
* Each type has a specific type for its value...
* Action : none
@@ -40,23 +40,23 @@ public:
kTextField_Type,
kCustom_Type
};
-
+
enum TriState {
kMixedState = -1,
kOffState = 0,
kOnState = 1
};
-
+
class Item {
public:
/**
* Auto increments a global to generate an unique ID for each new item
* Note: Thread safe
*/
- Item(const char label[], SkOSMenu::Type type, const char slotName[],
+ Item(const char label[], SkOSMenu::Type type, const char slotName[],
SkEvent* evt);
~Item() { delete fEvent; }
-
+
SkEvent* getEvent() const { return fEvent; }
int getID() const { return fID; }
const char* getLabel() const { return fLabel.c_str(); }
@@ -64,18 +64,18 @@ public:
Type getType() const { return fType; }
void setKeyEquivalent(SkUnichar key) { fKey = key; }
SkUnichar getKeyEquivalent() const { return fKey; }
-
+
/**
* Helper functions for predefined types
*/
void setBool(bool value) const; //For Switch
- void setScalar(SkScalar value) const; //For Slider
+ void setScalar(SkScalar value) const; //For Slider
void setInt(int value) const; //For List
void setTriState(TriState value) const; //For Tristate
void setString(const char value[]) const; //For TextField
-
+
/**
- * Post event associated with the menu item to target, any changes to
+ * Post event associated with the menu item to target, any changes to
* the associated event must be made prior to calling this method
*/
void postEvent() const { (new SkEvent(*(fEvent)))->post(); }
@@ -88,80 +88,80 @@ public:
Type fType;
SkUnichar fKey;
};
-
+
void reset();
const char* getTitle() const { return fTitle.c_str(); }
void setTitle (const char title[]) { fTitle.set(title); }
int getCount() const { return fItems.count(); }
const Item* getItemByID(int itemID) const;
void getItems(const Item* items[]) const;
-
+
/**
- * Assign key to the menu item with itemID, will do nothing if there's no
+ * Assign key to the menu item with itemID, will do nothing if there's no
* item with the id given
*/
void assignKeyEquivalentToItem(int itemID, SkUnichar key);
/**
- * Call this in a SkView's onHandleChar to trigger any menu items with the
- * given key equivalent. If such an item is found, the method will return
- * true and its corresponding event will be triggered (default behavior
+ * Call this in a SkView's onHandleChar to trigger any menu items with the
+ * given key equivalent. If such an item is found, the method will return
+ * true and its corresponding event will be triggered (default behavior
* defined for switches(toggling), tristates(cycle), and lists(cycle),
- * for anything else, the event attached is posted without state changes)
+ * for anything else, the event attached is posted without state changes)
* If no menu item can be matched with the key, false will be returned
*/
bool handleKeyEquivalent(SkUnichar key);
-
+
/**
- * The following functions append new items to the menu and returns their
- * associated unique id, which can be used to by the client to refer to
+ * The following functions append new items to the menu and returns their
+ * associated unique id, which can be used to by the client to refer to
* the menu item created and change its state. slotName specifies the string
* identifier of any state/value to be returned in the item's SkEvent object
* NOTE: evt must be dynamically allocated
*/
- int appendItem(const char label[], Type type, const char slotName[],
- SkEvent* evt);
-
+ int appendItem(const char label[], Type type, const char slotName[],
+ SkEvent* evt);
+
/**
- * Create predefined items with the given parameters. To be used with the
+ * Create predefined items with the given parameters. To be used with the
* other helper functions below to retrive/update state information.
- * Note: the helper functions below assume that slotName is UNIQUE for all
+ * Note: the helper functions below assume that slotName is UNIQUE for all
* menu items of the same type since it's used to identify the event
*/
int appendAction(const char label[], SkEventSinkID target);
- int appendList(const char label[], const char slotName[],
+ int appendList(const char label[], const char slotName[],
SkEventSinkID target, int defaultIndex, const char[] ...);
- int appendSlider(const char label[], const char slotName[],
- SkEventSinkID target, SkScalar min, SkScalar max,
+ int appendSlider(const char label[], const char slotName[],
+ SkEventSinkID target, SkScalar min, SkScalar max,
SkScalar defaultValue);
- int appendSwitch(const char label[], const char slotName[],
+ int appendSwitch(const char label[], const char slotName[],
SkEventSinkID target, bool defaultState = false);
int appendTriState(const char label[], const char slotName[],
SkEventSinkID target, TriState defaultState = kOffState);
int appendTextField(const char label[], const char slotName[],
SkEventSinkID target, const char placeholder[] = "");
-
-
+
+
/**
* Helper functions to retrieve information other than the stored value for
* some predefined types
*/
static bool FindListItemCount(const SkEvent& evt, int* count);
/**
- * Ensure that the items array can store n SkStrings where n is the count
+ * Ensure that the items array can store n SkStrings where n is the count
* extracted using FindListItemCount
*/
static bool FindListItems(const SkEvent& evt, SkString items[]);
static bool FindSliderMin(const SkEvent& evt, SkScalar* min);
static bool FindSliderMax(const SkEvent& evt, SkScalar* max);
-
+
/**
* Returns true if an action with the given label is found, false otherwise
*/
static bool FindAction(const SkEvent& evt, const char label[]);
/**
- * The following helper functions will return true if evt is generated from
- * a predefined item type and retrieve the corresponding state information.
- * They will return false and leave value unchanged if there's a type
+ * The following helper functions will return true if evt is generated from
+ * a predefined item type and retrieve the corresponding state information.
+ * They will return false and leave value unchanged if there's a type
* mismatch or slotName is incorrect
*/
static bool FindListIndex(const SkEvent& evt, const char slotName[], int* value);
@@ -169,11 +169,11 @@ public:
static bool FindSwitchState(const SkEvent& evt, const char slotName[], bool* value);
static bool FindTriState(const SkEvent& evt, const char slotName[], TriState* value);
static bool FindText(const SkEvent& evt, const char slotName[], SkString* value);
-
+
private:
SkString fTitle;
SkTDArray<Item*> fItems;
-
+
// illegal
SkOSMenu(const SkOSMenu&);
SkOSMenu& operator=(const SkOSMenu&);
diff --git a/include/views/SkOSWindow_Mac.h b/include/views/SkOSWindow_Mac.h
index 3391785ef9..d195cf1b65 100644
--- a/include/views/SkOSWindow_Mac.h
+++ b/include/views/SkOSWindow_Mac.h
@@ -17,7 +17,7 @@ public:
~SkOSWindow();
void* getHWND() const { return fHWND; }
- virtual bool onDispatchClick(int x, int y, Click::State state,
+ virtual bool onDispatchClick(int x, int y, Click::State state,
void* owner);
enum SkBackEndTypes {
kNone_BackEndType,
@@ -39,7 +39,7 @@ protected:
virtual void onAddMenu(const SkOSMenu*);
virtual void onUpdateMenu(const SkOSMenu*);
virtual void onSetTitle(const char[]);
-
+
private:
void* fHWND;
bool fInvalEventIsPending;
diff --git a/include/views/SkOSWindow_Win.h b/include/views/SkOSWindow_Win.h
index 5add420803..ff289bd6a6 100644
--- a/include/views/SkOSWindow_Win.h
+++ b/include/views/SkOSWindow_Win.h
@@ -61,7 +61,7 @@ protected:
private:
void* fHWND;
-
+
void doPaint(void* ctx);
#if SK_SUPPORT_GPU
@@ -89,7 +89,7 @@ private:
#endif // SK_ANGLE
#endif // SK_SUPPORT_GPU
- typedef SkWindow INHERITED;
+ typedef SkWindow INHERITED;
};
#endif
diff --git a/include/views/SkOSWindow_iOS.h b/include/views/SkOSWindow_iOS.h
index 33f014cb59..a1c4956be9 100755
--- a/include/views/SkOSWindow_iOS.h
+++ b/include/views/SkOSWindow_iOS.h
@@ -16,7 +16,7 @@ public:
~SkOSWindow();
void* getHWND() const { return fHWND; }
- virtual bool onDispatchClick(int x, int y, Click::State state,
+ virtual bool onDispatchClick(int x, int y, Click::State state,
void* owner);
enum SkBackEndTypes {
@@ -37,7 +37,7 @@ protected:
virtual void onAddMenu(const SkOSMenu*);
virtual void onUpdateMenu(const SkOSMenu*);
virtual void onSetTitle(const char[]);
-
+
private:
void* fHWND;
bool fInvalEventIsPending;
diff --git a/include/views/SkOSWindow_wxwidgets.h b/include/views/SkOSWindow_wxwidgets.h
index a662b4099e..ad939b2865 100644
--- a/include/views/SkOSWindow_wxwidgets.h
+++ b/include/views/SkOSWindow_wxwidgets.h
@@ -17,19 +17,19 @@ public:
SkOSWindow();
SkOSWindow(const wxString& title, int x, int y, int width, int height);
~SkOSWindow();
-
+
wxFrame* getWXFrame() const { return fFrame; }
-
+
void updateSize();
-
+
protected:
virtual void onHandleInval(const SkIRect&);
virtual void onAddMenu(const SkOSMenu*);
-
+
private:
wxFrame* fFrame;
typedef SkWindow INHERITED;
-
+
};
#endifpedef SkWindow INHERITED;
diff --git a/include/views/SkStackViewLayout.h b/include/views/SkStackViewLayout.h
index 705ff74bdb..f8d23de783 100644
--- a/include/views/SkStackViewLayout.h
+++ b/include/views/SkStackViewLayout.h
@@ -37,7 +37,7 @@ public:
kStart_Pack,
kCenter_Pack,
kEnd_Pack,
-
+
kPackCount
};
Pack getPack() const { return (Pack)fPack; }
diff --git a/include/views/SkSystemEventTypes.h b/include/views/SkSystemEventTypes.h
index f0f2952a32..bb2b5d5279 100644
--- a/include/views/SkSystemEventTypes.h
+++ b/include/views/SkSystemEventTypes.h
@@ -17,7 +17,7 @@
*/
#define SK_EventType_Delay "\xd" "lay"
#define SK_EventType_Inval "nv" "\xa" "l"
-#define SK_EventType_Key "key" "\x1"
+#define SK_EventType_Key "key" "\x1"
#define SK_EventType_OnEnd "on" "\xe" "n"
#define SK_EventType_Unichar "\xc" "har"
#define SK_EventType_KeyUp "key" "\xf"
diff --git a/include/views/SkTouchGesture.h b/include/views/SkTouchGesture.h
index 527065e540..1ba3865aa5 100644
--- a/include/views/SkTouchGesture.h
+++ b/include/views/SkTouchGesture.h
@@ -13,13 +13,13 @@
struct SkFlingState {
SkFlingState() : fActive(false) {}
-
+
bool isActive() const { return fActive; }
void stop() { fActive = false; }
-
+
void reset(float sx, float sy);
bool evaluateMatrix(SkMatrix* matrix);
-
+
private:
SkPoint fDirection;
SkScalar fSpeed0;
diff --git a/include/views/SkView.h b/include/views/SkView.h
index de497dd768..eb0621a18f 100644
--- a/include/views/SkView.h
+++ b/include/views/SkView.h
@@ -82,9 +82,9 @@ public:
void getLocalBounds(SkRect* bounds) const;
/** Loc - the view's offset with respect to its parent in its view hiearchy.
- NOTE: For more complex transforms, use Local Matrix. The tranformations
+ NOTE: For more complex transforms, use Local Matrix. The tranformations
are applied in the following order:
- canvas->translate(fLoc.fX, fLoc.fY);
+ canvas->translate(fLoc.fX, fLoc.fY);
canvas->concat(fMatrix);
*/
/** Return the view's left edge */
@@ -96,13 +96,13 @@ public:
void setLoc(const SkPoint& loc) { this->setLoc(loc.fX, loc.fY); }
void setLocX(SkScalar x) { this->setLoc(x, fLoc.fY); }
void setLocY(SkScalar y) { this->setLoc(fLoc.fX, y); }
-
- /** Local Matrix - matrix used to tranform the view with respect to its
- parent in its view hiearchy. Use setLocalMatrix to apply matrix
+
+ /** Local Matrix - matrix used to tranform the view with respect to its
+ parent in its view hiearchy. Use setLocalMatrix to apply matrix
transformations to the current view and in turn affect its children.
NOTE: For simple offsets, use Loc. The transformations are applied in
the following order:
- canvas->translate(fLoc.fX, fLoc.fY);
+ canvas->translate(fLoc.fX, fLoc.fY);
canvas->concat(fMatrix);
*/
const SkMatrix& getLocalMatrix() const { return fMatrix; }
@@ -205,7 +205,7 @@ public:
/** Convert the specified point from global coordinates into view-local coordinates
* Return true on success; false on failure
*/
- bool globalToLocal(SkPoint* pt) const {
+ bool globalToLocal(SkPoint* pt) const {
if (NULL != pt) {
return this->globalToLocal(pt->fX, pt->fY, pt);
}
@@ -217,7 +217,7 @@ public:
bool globalToLocal(SkScalar globalX, SkScalar globalY, SkPoint* local) const;
/** \class F2BIter
-
+
Iterator that will return each of this view's children, in
front-to-back order (the order used for clicking). The first
call to next() returns the front-most child view. When
@@ -232,7 +232,7 @@ public:
};
/** \class B2FIter
-
+
Iterator that will return each of this view's children, in
back-to-front order (the order they are drawn). The first
call to next() returns the back-most child view. When
@@ -247,7 +247,7 @@ public:
};
/** \class Artist
-
+
Install a subclass of this in a view (calling setArtist()), and then the
default implementation of that view's onDraw() will invoke this object
automatically.
@@ -275,7 +275,7 @@ public:
Artist* setArtist(Artist* artist);
/** \class Layout
-
+
Install a subclass of this in a view (calling setLayout()), and then the
default implementation of that view's onLayoutChildren() will invoke
this object automatically.
@@ -382,7 +382,7 @@ private:
friend class B2FIter;
friend class F2BIter;
-
+
friend class SkLayerView;
bool setFocusView(SkView* fvOrNull);
diff --git a/include/views/SkViewInflate.h b/include/views/SkViewInflate.h
index 7282091c45..b2cd1e67ce 100644
--- a/include/views/SkViewInflate.h
+++ b/include/views/SkViewInflate.h
@@ -17,7 +17,7 @@
class SkView;
class SkViewInflate {
-public:
+public:
SkViewInflate();
virtual ~SkViewInflate();
@@ -33,7 +33,7 @@ public:
if no match is found.
*/
SkView* findViewByID(const char id[]) const;
-
+
SkDEBUGCODE(void dump() const;)
protected:
diff --git a/include/views/SkWindow.h b/include/views/SkWindow.h
index c72163c223..a71bf4d7dc 100644
--- a/include/views/SkWindow.h
+++ b/include/views/SkWindow.h
@@ -54,7 +54,7 @@ public:
void addMenu(SkOSMenu*);
const SkTDArray<SkOSMenu*>* getMenus() { return &fMenus; }
-
+
const char* getTitle() const { return fTitle.c_str(); }
void setTitle(const char title[]);
@@ -93,7 +93,7 @@ private:
SkView* fFocusView;
bool fWaitingOnInval;
-
+
SkString fTitle;
SkMatrix fMatrix;
diff --git a/include/views/animated/SkImageView.h b/include/views/animated/SkImageView.h
index e17914151b..a21da0be51 100644
--- a/include/views/animated/SkImageView.h
+++ b/include/views/animated/SkImageView.h
@@ -25,7 +25,7 @@ public:
void getUri(SkString*) const;
void setUri(const char []);
void setUri(const SkString&);
-
+
enum ScaleType {
kMatrix_ScaleType,
@@ -36,7 +36,7 @@ public:
};
ScaleType getScaleType() const { return (ScaleType)fScaleType; }
void setScaleType(ScaleType);
-
+
bool getImageMatrix(SkMatrix*) const;
void setImageMatrix(const SkMatrix*);
@@ -45,7 +45,7 @@ protected:
virtual bool onEvent(const SkEvent&);
virtual void onDraw(SkCanvas*);
virtual void onInflate(const SkDOM&, const SkDOMNode*);
-
+
private:
SkString fUri;
SkMatrix* fMatrix; // null or copy of caller's matrix ,,,,,
@@ -56,7 +56,7 @@ private:
uint8_t fScaleType;
SkBool8 fDataIsAnim; // as opposed to bitmap
SkBool8 fUriIsValid;
-
+
void onUriChange();
bool getDataBounds(SkRect* bounds);
bool freeData();
diff --git a/include/views/animated/SkProgressBarView.h b/include/views/animated/SkProgressBarView.h
index 0e39d1e0b6..7e670a9ad5 100644
--- a/include/views/animated/SkProgressBarView.h
+++ b/include/views/animated/SkProgressBarView.h
@@ -18,29 +18,29 @@ class SkProgressBarView : public SkWidgetView {
public:
SkProgressBarView();
//SkProgressBarView(int max);
-
+
//inflate: "sk-progress"
-
+
void reset(); //reset progress to zero
void setProgress(int progress);
void changeProgress(int diff);
void setMax(int max);
-
+
int getProgress() const { return fProgress; }
int getMax() const { return fMax; }
-
+
protected:
//overrides
virtual void onInflate(const SkDOM& dom, const SkDOM::Node* node);
virtual void onSizeChange();
virtual void onDraw(SkCanvas* canvas);
virtual bool onEvent(const SkEvent& evt);
-
+
private:
SkAnimator fAnim;
int fProgress;
int fMax;
-
+
typedef SkWidgetView INHERITED;
};
diff --git a/include/views/animated/SkScrollBarView.h b/include/views/animated/SkScrollBarView.h
index 110d0e12f0..1270e14136 100644
--- a/include/views/animated/SkScrollBarView.h
+++ b/include/views/animated/SkScrollBarView.h
@@ -22,10 +22,10 @@ public:
unsigned getShown() const { return fShownLength; }
unsigned getTotal() const { return fTotalLength; }
- void setStart(unsigned start);
+ void setStart(unsigned start);
void setShown(unsigned shown);
void setTotal(unsigned total);
-
+
protected:
//overrides
virtual void onInflate(const SkDOM& dom, const SkDOM::Node* node);
@@ -36,9 +36,9 @@ protected:
private:
SkAnimator fAnim;
unsigned fTotalLength, fStartPoint, fShownLength;
-
+
void adjust();
-
+
typedef SkWidgetView INHERITED;
};
#endif
diff --git a/include/views/animated/SkWidgetViews.h b/include/views/animated/SkWidgetViews.h
index 93adeef6b0..40346600c3 100644
--- a/include/views/animated/SkWidgetViews.h
+++ b/include/views/animated/SkWidgetViews.h
@@ -21,7 +21,7 @@ enum SkWidgetEnum {
kProgress_WidgetEnum, //!< <sk-progress>
kScroll_WidgetEnum, //!< <sk-scroll>
kText_WidgetEnum, //!< <sk-text>
-
+
kWidgetEnumCount
};
@@ -32,7 +32,7 @@ enum SkinEnum {
kProgress_SkinEnum,
kScroll_SkinEnum,
kStaticText_SkinEnum,
-
+
kSkinEnumCount
};
@@ -73,7 +73,7 @@ public:
/** Returns true if the widget can post its event to its listeners.
*/
bool postWidgetEvent();
-
+
/** Returns the sinkID of the widgetview that posted the event, or 0
*/
static SkEventSinkID GetWidgetEventSinkID(const SkEvent&);
@@ -93,11 +93,11 @@ protected:
// overrides
virtual void onInflate(const SkDOM& dom, const SkDOM::Node*);
-
+
private:
SkString fLabel;
SkEvent fEvent;
-
+
typedef SkView INHERITED;
};
@@ -106,7 +106,7 @@ private:
class SkButtonView : public SkWidgetView {
public:
// inflate: "sk-button"
-
+
protected:
// overrides
virtual bool onEvent(const SkEvent&);
@@ -121,7 +121,7 @@ public:
SkCheckButtonView();
// inflate: "sk-checkbutton"
-
+
enum CheckState {
kOff_CheckState, //!< inflate: check-state="off"
kOn_CheckState, //!< inflate: check-state="on"
@@ -144,10 +144,10 @@ protected:
// overrides
virtual void onInflate(const SkDOM& dom, const SkDOM::Node*);
virtual bool onPrepareWidgetEvent(SkEvent* evt);
-
+
private:
uint8_t fCheckState;
-
+
typedef SkWidgetView INHERITED;
};
@@ -214,7 +214,7 @@ public:
bool hasScrollBar() const { return fScrollBar != NULL; }
void setHasScrollBar(bool);
-
+
/** Return the number of visible rows
*/
int getVisibleRowCount() const { return fVisibleRowCount; }
@@ -300,7 +300,7 @@ public:
virtual void getRecord(int rowIndex, int fieldIndex, SkString* data);
virtual bool prepareWidgetEvent(SkEvent*, int rowIndex);
-
+
static SkListSource* Factory(const char name[]);
private:
typedef SkRefCnt INHERITED;
diff --git a/include/xml/SkBML_WXMLParser.h b/include/xml/SkBML_WXMLParser.h
index e16b95c956..5d220cfbaa 100644
--- a/include/xml/SkBML_WXMLParser.h
+++ b/include/xml/SkBML_WXMLParser.h
@@ -21,10 +21,10 @@ public:
BML_WXMLParser(SkWStream& writer);
virtual ~BML_WXMLParser();
static void Write(SkStream& s, const char filename[]);
-
+
/** @cond UNIT_TEST */
SkDEBUGCODE(static void UnitTest();)
- /** @endcond */
+ /** @endcond */
private:
virtual bool onAddAttribute(const char name[], const char value[]);
virtual bool onEndElement(const char name[]);
diff --git a/include/xml/SkDOM.h b/include/xml/SkDOM.h
index 60145c8efa..fd175f06b7 100644
--- a/include/xml/SkDOM.h
+++ b/include/xml/SkDOM.h
@@ -47,7 +47,7 @@ public:
const Attr* getNextAttr(const Node*, const Attr*) const;
const char* getAttrName(const Node*, const Attr*) const;
const char* getAttrValue(const Node*, const Attr*) const;
-
+
// helpers for walking children
int countChildren(const Node* node, const char elem[] = NULL) const;
diff --git a/include/xml/SkXMLParser.h b/include/xml/SkXMLParser.h
index bd8c2f15ee..1a90bf71e7 100644
--- a/include/xml/SkXMLParser.h
+++ b/include/xml/SkXMLParser.h
@@ -76,7 +76,7 @@ public:
virtual bool startElement(const char elem[]);
virtual bool addAttribute(const char name[], const char value[]);
virtual bool endElement(const char elem[]);
- virtual bool text(const char text[], int len);
+ virtual bool text(const char text[], int len);
void* fParser;
protected:
SkXMLParserError* fError;
@@ -116,14 +116,14 @@ public:
const char* fName;
const char* fValue;
};
-
+
int getDepth() const { return fDepth; }
const char* getName();
int getAttributeCount();
void getAttributeInfo(int, AttrInfo*);
const char* getText();
bool isWhitespace();
-
+
protected:
virtual bool onEntityReplacement(const char name[],
SkString* replacement);
@@ -142,11 +142,11 @@ private:
bool onInit(); // return false on failure
EventType onNextToken();
void onExit();
-
+
SkStream* fStream;
Curr fCurr;
int fDepth;
-
+
struct Impl;
Impl* fImpl;
};