Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(797)

Unified Diff: samplecode/SampleText.cpp

Issue 134163010: Refactor read and write buffers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: whoops, read buffers have .size() Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SampleSlides.cpp ('k') | src/core/SkAnnotation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleText.cpp
diff --git a/samplecode/SampleText.cpp b/samplecode/SampleText.cpp
index 9aefd2c09b0de2f9d717b587e0d4340061d9fdc8..7e98171daa4ea96215d1f9acd40376c61f7c2b06 100644
--- a/samplecode/SampleText.cpp
+++ b/samplecode/SampleText.cpp
@@ -8,7 +8,8 @@
#include "SampleCode.h"
#include "SkView.h"
#include "SkCanvas.h"
-#include "SkFlattenableBuffers.h"
+#include "SkReadBuffer.h"
+#include "SkWriteBuffer.h"
#include "SkGradientShader.h"
#include "SkGraphics.h"
#include "SkImageDecoder.h"
@@ -59,7 +60,7 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(ReduceNoise)
private:
- ReduceNoise(SkFlattenableReadBuffer& rb) : SkKernel33ProcMaskFilter(rb) {}
+ ReduceNoise(SkReadBuffer& rb) : SkKernel33ProcMaskFilter(rb) {}
typedef SkKernel33ProcMaskFilter INHERITED;
};
@@ -91,7 +92,7 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Darken)
private:
- Darken(SkFlattenableReadBuffer& rb) : SkKernel33ProcMaskFilter(rb) {}
+ Darken(SkReadBuffer& rb) : SkKernel33ProcMaskFilter(rb) {}
typedef SkKernel33ProcMaskFilter INHERITED;
};
@@ -143,7 +144,7 @@ public:
virtual void xfer16(uint16_t dst[], const SkPMColor src[], int count,
const SkAlpha aa[]) const SK_OVERRIDE;
- typedef SkFlattenable* (*Factory)(SkFlattenableReadBuffer&);
+ typedef SkFlattenable* (*Factory)(SkReadBuffer&);
SK_DEVELOPER_TO_STRING()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPowerMode)
@@ -153,11 +154,11 @@ private:
uint8_t fTable[256]; // cache
void init(SkScalar exponent);
- SkPowerMode(SkFlattenableReadBuffer& b) : INHERITED(b) {
+ SkPowerMode(SkReadBuffer& b) : INHERITED(b) {
// read the exponent
this->init(SkFixedToScalar(b.readFixed()));
}
- virtual void flatten(SkFlattenableWriteBuffer& b) const SK_OVERRIDE {
+ virtual void flatten(SkWriteBuffer& b) const SK_OVERRIDE {
this->INHERITED::flatten(b);
b.writeFixed(SkScalarToFixed(fExp));
}
« no previous file with comments | « samplecode/SampleSlides.cpp ('k') | src/core/SkAnnotation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698