2 * Copyright 2017 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #include "SkGradientShader.h"
9 #include "SkPictureRecorder.h"
12 DEF_SIMPLE_GM(bug6643, canvas, 200, 200) {
13 SkColor colors[] = { SK_ColorTRANSPARENT, SK_ColorGREEN, SK_ColorTRANSPARENT };
17 p.setShader(SkGradientShader::MakeSweep(100, 100, colors, nullptr, SK_ARRAY_COUNT(colors),
18 SkGradientShader::kInterpolateColorsInPremul_Flag,
21 SkPictureRecorder recorder;
22 recorder.beginRecording(200, 200)->drawPaint(p);
24 p.setShader(SkShader::MakePictureShader(recorder.finishRecordingAsPicture(),
25 SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode,
27 canvas->drawColor(SK_ColorWHITE);