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

Unified Diff: src/utils/SkUnitMappers.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/pipe/SkGPipeWrite.cpp ('k') | tests/AndroidPaintTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkUnitMappers.cpp
diff --git a/src/utils/SkUnitMappers.cpp b/src/utils/SkUnitMappers.cpp
index f86a4542db8cd3957a224d8bb0d374b562c240c2..336a26e1643f52ae9d9947d8587cbc18fd6bbaf0 100644
--- a/src/utils/SkUnitMappers.cpp
+++ b/src/utils/SkUnitMappers.cpp
@@ -6,7 +6,8 @@
* found in the LICENSE file.
*/
#include "SkUnitMappers.h"
-#include "SkFlattenableBuffers.h"
+#include "SkReadBuffer.h"
+#include "SkWriteBuffer.h"
SkDiscreteMapper::SkDiscreteMapper(int segments) {
@@ -29,13 +30,13 @@ uint16_t SkDiscreteMapper::mapUnit16(uint16_t input) {
return SkToU16(x);
}
-SkDiscreteMapper::SkDiscreteMapper(SkFlattenableReadBuffer& rb)
+SkDiscreteMapper::SkDiscreteMapper(SkReadBuffer& rb)
: SkUnitMapper(rb) {
fSegments = rb.readInt();
fScale = rb.read32();
}
-void SkDiscreteMapper::flatten(SkFlattenableWriteBuffer& wb) const {
+void SkDiscreteMapper::flatten(SkWriteBuffer& wb) const {
this->INHERITED::flatten(wb);
wb.writeInt(fSegments);
@@ -56,5 +57,5 @@ uint16_t SkCosineMapper::mapUnit16(uint16_t input)
return SkToU16(x);
}
-SkCosineMapper::SkCosineMapper(SkFlattenableReadBuffer& rb)
+SkCosineMapper::SkCosineMapper(SkReadBuffer& rb)
: SkUnitMapper(rb) {}
« no previous file with comments | « src/pipe/SkGPipeWrite.cpp ('k') | tests/AndroidPaintTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698