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

Unified Diff: src/core/SkShader.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/core/SkScalerContext.cpp ('k') | src/core/SkValidatingReadBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkShader.cpp
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp
index 33fddb1183fd6039ffa4c4b5a9b272b29e705a95..bebfc59912f51310b9305ca578959387bbed2816 100644
--- a/src/core/SkShader.cpp
+++ b/src/core/SkShader.cpp
@@ -8,7 +8,8 @@
#include "SkScalar.h"
#include "SkShader.h"
-#include "SkFlattenableBuffers.h"
+#include "SkReadBuffer.h"
+#include "SkWriteBuffer.h"
#include "SkPaint.h"
#include "SkMallocPixelRef.h"
@@ -17,7 +18,7 @@ SkShader::SkShader() {
SkDEBUGCODE(fInSetContext = false;)
}
-SkShader::SkShader(SkFlattenableReadBuffer& buffer)
+SkShader::SkShader(SkReadBuffer& buffer)
: INHERITED(buffer) {
if (buffer.readBool()) {
buffer.readMatrix(&fLocalMatrix);
@@ -32,7 +33,7 @@ SkShader::~SkShader() {
SkASSERT(!fInSetContext);
}
-void SkShader::flatten(SkFlattenableWriteBuffer& buffer) const {
+void SkShader::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
bool hasLocalM = this->hasLocalMatrix();
buffer.writeBool(hasLocalM);
@@ -213,7 +214,7 @@ bool SkColorShader::isOpaque() const {
return SkColorGetA(fColor) == 255;
}
-SkColorShader::SkColorShader(SkFlattenableReadBuffer& b) : INHERITED(b) {
+SkColorShader::SkColorShader(SkReadBuffer& b) : INHERITED(b) {
fFlags = 0; // computed in setContext
fInheritColor = b.readBool();
@@ -223,7 +224,7 @@ SkColorShader::SkColorShader(SkFlattenableReadBuffer& b) : INHERITED(b) {
fColor = b.readColor();
}
-void SkColorShader::flatten(SkFlattenableWriteBuffer& buffer) const {
+void SkColorShader::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeBool(fInheritColor);
if (fInheritColor) {
« no previous file with comments | « src/core/SkScalerContext.cpp ('k') | src/core/SkValidatingReadBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698