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

Unified Diff: src/effects/SkColorFilters.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 | « src/effects/SkColorFilterImageFilter.cpp ('k') | src/effects/SkColorMatrix.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorFilters.cpp
diff --git a/src/effects/SkColorFilters.cpp b/src/effects/SkColorFilters.cpp
index d482a09d1f870323b21e5b34486f452558c011d2..f9fa1fd82bfa16f53053cbeaf9f7759bd8012060 100644
--- a/src/effects/SkColorFilters.cpp
+++ b/src/effects/SkColorFilters.cpp
@@ -10,7 +10,8 @@
#include "SkBlitRow.h"
#include "SkColorFilter.h"
#include "SkColorPriv.h"
-#include "SkFlattenableBuffers.h"
+#include "SkReadBuffer.h"
+#include "SkWriteBuffer.h"
#include "SkUtils.h"
#include "SkString.h"
#include "SkValidationUtils.h"
@@ -92,13 +93,13 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkModeColorFilter)
protected:
- virtual void flatten(SkFlattenableWriteBuffer& buffer) const SK_OVERRIDE {
+ virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE {
this->INHERITED::flatten(buffer);
buffer.writeColor(fColor);
buffer.writeUInt(fMode);
}
- SkModeColorFilter(SkFlattenableReadBuffer& buffer) {
+ SkModeColorFilter(SkReadBuffer& buffer) {
fColor = buffer.readColor();
fMode = (SkXfermode::Mode)buffer.readUInt();
if (buffer.isValid()) {
@@ -446,7 +447,7 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Src_SkModeColorFilter)
protected:
- Src_SkModeColorFilter(SkFlattenableReadBuffer& buffer)
+ Src_SkModeColorFilter(SkReadBuffer& buffer)
: INHERITED(buffer) {}
private:
@@ -482,7 +483,7 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SrcOver_SkModeColorFilter)
protected:
- SrcOver_SkModeColorFilter(SkFlattenableReadBuffer& buffer)
+ SrcOver_SkModeColorFilter(SkReadBuffer& buffer)
: INHERITED(buffer) {
fColor32Proc = SkBlitRow::ColorProcFactory();
}
@@ -585,13 +586,13 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLightingColorFilter)
protected:
- virtual void flatten(SkFlattenableWriteBuffer& buffer) const SK_OVERRIDE {
+ virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE {
this->INHERITED::flatten(buffer);
buffer.writeColor(fMul);
buffer.writeColor(fAdd);
}
- SkLightingColorFilter(SkFlattenableReadBuffer& buffer) {
+ SkLightingColorFilter(SkReadBuffer& buffer) {
fMul = buffer.readColor();
fAdd = buffer.readColor();
}
@@ -637,7 +638,7 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLightingColorFilter_JustAdd)
protected:
- SkLightingColorFilter_JustAdd(SkFlattenableReadBuffer& buffer)
+ SkLightingColorFilter_JustAdd(SkReadBuffer& buffer)
: INHERITED(buffer) {}
private:
@@ -678,7 +679,7 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLightingColorFilter_JustMul)
protected:
- SkLightingColorFilter_JustMul(SkFlattenableReadBuffer& buffer)
+ SkLightingColorFilter_JustMul(SkReadBuffer& buffer)
: INHERITED(buffer) {}
private:
@@ -722,7 +723,7 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLightingColorFilter_SingleMul)
protected:
- SkLightingColorFilter_SingleMul(SkFlattenableReadBuffer& buffer)
+ SkLightingColorFilter_SingleMul(SkReadBuffer& buffer)
: INHERITED(buffer) {}
private:
@@ -770,7 +771,7 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLightingColorFilter_NoPin)
protected:
- SkLightingColorFilter_NoPin(SkFlattenableReadBuffer& buffer)
+ SkLightingColorFilter_NoPin(SkReadBuffer& buffer)
: INHERITED(buffer) {}
private:
@@ -781,7 +782,7 @@ private:
class SkSimpleColorFilter : public SkColorFilter {
public:
- static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
+ static SkFlattenable* CreateProc(SkReadBuffer& buffer) {
return SkNEW(SkSimpleColorFilter);
}
@@ -799,7 +800,7 @@ protected:
}
}
- virtual void flatten(SkFlattenableWriteBuffer& buffer) const SK_OVERRIDE {}
+ virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE {}
virtual Factory getFactory() const {
return CreateProc;
« no previous file with comments | « src/effects/SkColorFilterImageFilter.cpp ('k') | src/effects/SkColorMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698