| Index: cc/layers/heads_up_display_layer_impl.cc
|
| diff --git a/cc/layers/heads_up_display_layer_impl.cc b/cc/layers/heads_up_display_layer_impl.cc
|
| index c5dc2eac158d6ad3d3d26f839af2d8db1f6c6d9e..c2f8a1b543ca3dc4e163fad5777e2c7c25c042ae 100644
|
| --- a/cc/layers/heads_up_display_layer_impl.cc
|
| +++ b/cc/layers/heads_up_display_layer_impl.cc
|
| @@ -40,17 +40,16 @@ static inline SkPaint CreatePaint() {
|
| #if (SK_R32_SHIFT || SK_B32_SHIFT != 16)
|
| // The SkCanvas is in RGBA but the shader is expecting BGRA, so we need to
|
| // swizzle our colors when drawing to the SkCanvas.
|
| - SkColorMatrix swizzle_matrix;
|
| + SkScalar color_matrix[20];
|
| for (int i = 0; i < 20; ++i)
|
| - swizzle_matrix.fMat[i] = 0;
|
| - swizzle_matrix.fMat[0 + 5 * 2] = 1;
|
| - swizzle_matrix.fMat[1 + 5 * 1] = 1;
|
| - swizzle_matrix.fMat[2 + 5 * 0] = 1;
|
| - swizzle_matrix.fMat[3 + 5 * 3] = 1;
|
| -
|
| - skia::RefPtr<SkColorFilter> filter =
|
| - skia::AdoptRef(SkColorMatrixFilter::Create(swizzle_matrix));
|
| - paint.setColorFilter(filter.get());
|
| + color_matrix[i] = 0;
|
| + color_matrix[0 + 5 * 2] = 1;
|
| + color_matrix[1 + 5 * 1] = 1;
|
| + color_matrix[2 + 5 * 0] = 1;
|
| + color_matrix[3 + 5 * 3] = 1;
|
| +
|
| + paint.setColorFilter(
|
| + SkColorFilter::MakeMatrixFilterRowMajor255(color_matrix));
|
| #endif
|
| return paint;
|
| }
|
|
|