Index: src/core/SkColorShader.cpp |
diff --git a/src/core/SkColorShader.cpp b/src/core/SkColorShader.cpp |
index 250a367822a2ecbe88e34fac23e592f4e283f3b0..c61081603de64ba9ed0df5d9c23798d9bed79626 100644 |
--- a/src/core/SkColorShader.cpp |
+++ b/src/core/SkColorShader.cpp |
@@ -133,10 +133,10 @@ SkColor4Shader::SkColor4Shader(const SkColor4f& color, sk_sp<SkColorSpace> space |
sk_sp<SkFlattenable> SkColor4Shader::CreateProc(SkReadBuffer& buffer) { |
SkColor4f color; |
- color.fA = buffer.readScalar(); // readFloat() |
- color.fR = buffer.readScalar(); |
+ color.fR = buffer.readScalar(); // readFloat() |
color.fG = buffer.readScalar(); |
color.fB = buffer.readScalar(); |
+ color.fA = buffer.readScalar(); |
if (buffer.readBool()) { |
// TODO how do we unflatten colorspaces |
} |
@@ -144,10 +144,10 @@ sk_sp<SkFlattenable> SkColor4Shader::CreateProc(SkReadBuffer& buffer) { |
} |
void SkColor4Shader::flatten(SkWriteBuffer& buffer) const { |
- buffer.writeScalar(fColor4.fA); // writeFloat() |
- buffer.writeScalar(fColor4.fR); |
+ buffer.writeScalar(fColor4.fR); // writeFloat() |
buffer.writeScalar(fColor4.fG); |
buffer.writeScalar(fColor4.fB); |
+ buffer.writeScalar(fColor4.fA); |
buffer.writeBool(false); // TODO how do we flatten colorspaces? |
} |
@@ -232,7 +232,7 @@ sk_sp<GrFragmentProcessor> SkColor4Shader::asFragmentProcessor(GrContext*, const |
void SkColor4Shader::toString(SkString* str) const { |
str->append("SkColor4Shader: ("); |
- str->append("ARGB:"); |
+ str->append("RGBA:"); |
for (int i = 0; i < 4; ++i) { |
str->appendf(" %g", fColor4.vec()[i]); |
} |