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

Unified Diff: src/effects/SkKernel33MaskFilter.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/SkEmbossMaskFilter.cpp ('k') | src/effects/SkLayerDrawLooper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkKernel33MaskFilter.cpp
diff --git a/src/effects/SkKernel33MaskFilter.cpp b/src/effects/SkKernel33MaskFilter.cpp
index 821eebd7853a5701b87a2d2fddbb9f9205727f9c..353661de25db84d5c9421f81f3d24541a81d0ca6 100644
--- a/src/effects/SkKernel33MaskFilter.cpp
+++ b/src/effects/SkKernel33MaskFilter.cpp
@@ -7,7 +7,8 @@
*/
#include "SkKernel33MaskFilter.h"
#include "SkColorPriv.h"
-#include "SkFlattenableBuffers.h"
+#include "SkReadBuffer.h"
+#include "SkWriteBuffer.h"
#include "SkString.h"
SkMask::Format SkKernel33ProcMaskFilter::getFormat() const {
@@ -75,12 +76,12 @@ bool SkKernel33ProcMaskFilter::filterMask(SkMask* dst, const SkMask& src,
return true;
}
-void SkKernel33ProcMaskFilter::flatten(SkFlattenableWriteBuffer& wb) const {
+void SkKernel33ProcMaskFilter::flatten(SkWriteBuffer& wb) const {
this->INHERITED::flatten(wb);
wb.writeInt(fPercent256);
}
-SkKernel33ProcMaskFilter::SkKernel33ProcMaskFilter(SkFlattenableReadBuffer& rb)
+SkKernel33ProcMaskFilter::SkKernel33ProcMaskFilter(SkReadBuffer& rb)
: SkMaskFilter(rb) {
fPercent256 = rb.readInt();
}
@@ -112,13 +113,13 @@ uint8_t SkKernel33MaskFilter::computeValue(uint8_t* const* srcRows) const {
return (uint8_t)value;
}
-void SkKernel33MaskFilter::flatten(SkFlattenableWriteBuffer& wb) const {
+void SkKernel33MaskFilter::flatten(SkWriteBuffer& wb) const {
this->INHERITED::flatten(wb);
wb.writeIntArray(&fKernel[0][0], 9);
wb.writeInt(fShift);
}
-SkKernel33MaskFilter::SkKernel33MaskFilter(SkFlattenableReadBuffer& rb)
+SkKernel33MaskFilter::SkKernel33MaskFilter(SkReadBuffer& rb)
: SkKernel33ProcMaskFilter(rb) {
SkDEBUGCODE(bool success = )rb.readIntArray(&fKernel[0][0], 9);
SkASSERT(success);
« no previous file with comments | « src/effects/SkEmbossMaskFilter.cpp ('k') | src/effects/SkLayerDrawLooper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698