diff options
author | 2012-08-07 15:54:32 +0000 | |
---|---|---|
committer | 2012-08-07 15:54:32 +0000 | |
commit | c73dd5c6880739f26216f198c757028fd28df1a4 (patch) | |
tree | 17a4984fe2caecb5d36a27324eaa698550d4db04 /samplecode | |
parent | 7b4531f64cbd85d32a77ceab1bdec8335c5a7864 (diff) |
Update SkFlattenable buffers to be more modular.
This CL is an effort to stage the conversion to named
parameters for all SkFlattenable commands. This particular
stage only does the following two things...
1. Move flattenable buffers from SkFlattenable.h into
their own header.
2. Update and Add new read write methods for better clarity
and convenience.
BUG=
Review URL: https://codereview.appspot.com/6448095
git-svn-id: http://skia.googlecode.com/svn/trunk@4980 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode')
-rw-r--r-- | samplecode/ClockFaceView.cpp | 1 | ||||
-rw-r--r-- | samplecode/SampleAll.cpp | 1 | ||||
-rw-r--r-- | samplecode/SampleSlides.cpp | 1 | ||||
-rw-r--r-- | samplecode/SampleText.cpp | 5 | ||||
-rw-r--r-- | samplecode/SampleTextEffects.cpp | 1 |
5 files changed, 7 insertions, 2 deletions
diff --git a/samplecode/ClockFaceView.cpp b/samplecode/ClockFaceView.cpp index 7d4da1051b..a719608cad 100644 --- a/samplecode/ClockFaceView.cpp +++ b/samplecode/ClockFaceView.cpp @@ -8,6 +8,7 @@ #include "SampleCode.h" #include "SkView.h" #include "SkCanvas.h" +#include "SkFlattenableBuffers.h" #include "SkGradientShader.h" #include "SkPath.h" #include "SkRegion.h" diff --git a/samplecode/SampleAll.cpp b/samplecode/SampleAll.cpp index 303059be42..9644e79599 100644 --- a/samplecode/SampleAll.cpp +++ b/samplecode/SampleAll.cpp @@ -18,6 +18,7 @@ #include "SkDashPathEffect.h" #include "SkDiscretePathEffect.h" #include "SkEmbossMaskFilter.h" +#include "SkFlattenableBuffers.h" #include "SkGradientShader.h" #include "SkImageDecoder.h" #include "SkLayerRasterizer.h" diff --git a/samplecode/SampleSlides.cpp b/samplecode/SampleSlides.cpp index 1154c764d8..54a9cf95fc 100644 --- a/samplecode/SampleSlides.cpp +++ b/samplecode/SampleSlides.cpp @@ -9,6 +9,7 @@ #include "SkView.h" #include "SkCanvas.h" #include "SkDevice.h" +#include "SkFlattenableBuffers.h" #include "SkPaint.h" #define BG_COLOR 0xFFDDDDDD diff --git a/samplecode/SampleText.cpp b/samplecode/SampleText.cpp index db4dbeaef2..7d192f4a28 100644 --- a/samplecode/SampleText.cpp +++ b/samplecode/SampleText.cpp @@ -9,6 +9,7 @@ #include "SkView.h" #include "SkCanvas.h" #include "Sk64.h" +#include "SkFlattenableBuffers.h" #include "SkGradientShader.h" #include "SkGraphics.h" #include "SkImageDecoder.h" @@ -134,11 +135,11 @@ private: void init(SkScalar exponent); SkPowerMode(SkFlattenableReadBuffer& b) : INHERITED(b) { // read the exponent - this->init(SkFixedToScalar(b.readS32())); + this->init(SkFixedToScalar(b.readFixed())); } virtual void flatten(SkFlattenableWriteBuffer& b) const SK_OVERRIDE { this->INHERITED::flatten(b); - b.write32(SkScalarToFixed(fExp)); + b.writeFixed(SkScalarToFixed(fExp)); } typedef SkXfermode INHERITED; diff --git a/samplecode/SampleTextEffects.cpp b/samplecode/SampleTextEffects.cpp index 215154894e..b2feae77a1 100644 --- a/samplecode/SampleTextEffects.cpp +++ b/samplecode/SampleTextEffects.cpp @@ -8,6 +8,7 @@ #include "SampleCode.h" #include "SkView.h" #include "SkCanvas.h" +#include "SkFlattenableBuffers.h" #include "SkGradientShader.h" #include "SkPath.h" #include "SkRegion.h" |