#include "SkScalar.h"
#include "SkShader.h"
-#include "SkFlattenableBuffers.h"
+#include "SkReadBuffer.h"
+#include "SkWriteBuffer.h"
#include "SkPaint.h"
#include "SkMallocPixelRef.h"
SkDEBUGCODE(fInSetContext = false;)
}
-SkShader::SkShader(SkFlattenableReadBuffer& buffer)
+SkShader::SkShader(SkReadBuffer& buffer)
: INHERITED(buffer) {
if (buffer.readBool()) {
buffer.readMatrix(&fLocalMatrix);
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);
const SkMatrix* m = &matrix;
SkMatrix total;
- fDeviceConfig = SkToU8(device.config());
fPaintAlpha = paint.getAlpha();
if (this->hasLocalMatrix()) {
total.setConcat(matrix, this->getLocalMatrix());
return SkColorGetA(fColor) == 255;
}
-SkColorShader::SkColorShader(SkFlattenableReadBuffer& b) : INHERITED(b) {
+SkColorShader::SkColorShader(SkReadBuffer& b) : INHERITED(b) {
fFlags = 0; // computed in setContext
fInheritColor = b.readBool();
fColor = b.readColor();
}
-void SkColorShader::flatten(SkFlattenableWriteBuffer& buffer) const {
+void SkColorShader::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeBool(fInheritColor);
if (fInheritColor) {