Index: src/pdf/SkPDFDevice.cpp |
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp |
index 8e417b1f529dbf9e4b41909175a9cf7107aeb940..340f3674af6466b1343fa0c909b8e06ec68bbb47 100644 |
--- a/src/pdf/SkPDFDevice.cpp |
+++ b/src/pdf/SkPDFDevice.cpp |
@@ -51,12 +51,11 @@ static void replace_srcmode_on_opaque_paint(SkPaint* paint) { |
static void emit_pdf_color(SkColor color, SkWStream* result) { |
SkASSERT(SkColorGetA(color) == 0xFF); // We handle alpha elsewhere. |
- SkScalar colorScale = SkScalarInvert(0xFF); |
- SkPDFUtils::AppendScalar(SkColorGetR(color) * colorScale, result); |
+ SkPDFUtils::AppendColorComponent(SkColorGetR(color), result); |
result->writeText(" "); |
- SkPDFUtils::AppendScalar(SkColorGetG(color) * colorScale, result); |
+ SkPDFUtils::AppendColorComponent(SkColorGetG(color), result); |
result->writeText(" "); |
- SkPDFUtils::AppendScalar(SkColorGetB(color) * colorScale, result); |
+ SkPDFUtils::AppendColorComponent(SkColorGetB(color), result); |
result->writeText(" "); |
} |