2 * Copyright 2015 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
9 #include "SkColorMatrixFilter.h"
10 #include "SkColorFilterImageFilter.h"
12 // This GM renders correctly in 8888, but fails in PDF
13 DEF_SIMPLE_GM(fadefilter, canvas, 256, 256) {
14 SkScalar matrix[20] = { 1, 0, 0, 0, 128.0f,
18 sk_sp<SkColorFilter> colorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(matrix));
20 layerPaint.setImageFilter(SkColorFilterImageFilter::Make(std::move(colorFilter), nullptr));
21 canvas->drawRect(SkRect::MakeLTRB(64, 64, 192, 192), layerPaint);