Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / src / core / SkShader.cpp
index 33fddb1..47889f0 100644 (file)
@@ -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);
@@ -49,7 +50,6 @@ bool SkShader::setContext(const SkBitmap& device,
     const SkMatrix* m = &matrix;
     SkMatrix        total;
 
-    fDeviceConfig = SkToU8(device.config());
     fPaintAlpha = paint.getAlpha();
     if (this->hasLocalMatrix()) {
         total.setConcat(matrix, this->getLocalMatrix());
@@ -213,7 +213,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 +223,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) {