Esempio n. 1
0
 ComposeShaderBitmapGM() {
     draw_color_bm(&fColorBitmap, squareLength);
     draw_alpha8_bm(&fAlpha8Bitmap, squareLength);
     SkMatrix s;
     s.reset();
     fColorBitmapShader = new SkBitmapProcShader(fColorBitmap, SkShader::kRepeat_TileMode,
                                                 SkShader::kRepeat_TileMode, &s);
     fAlpha8BitmapShader = new SkBitmapProcShader(fAlpha8Bitmap, SkShader::kRepeat_TileMode,
                                                  SkShader::kRepeat_TileMode, &s);
     fLinearGradientShader = make_linear_gradient_shader(squareLength);
 }
Esempio n. 2
0
 void onOnceBeforeDraw() override {
     draw_color_bm(&fColorBitmap, squareLength);
     draw_alpha8_bm(&fAlpha8Bitmap, squareLength);
     SkMatrix s;
     s.reset();
     fColorBitmapShader = SkShader::MakeBitmapShader(fColorBitmap, SkShader::kRepeat_TileMode,
                                                     SkShader::kRepeat_TileMode, &s);
     fAlpha8BitmapShader = SkShader::MakeBitmapShader(fAlpha8Bitmap, SkShader::kRepeat_TileMode,
                                                      SkShader::kRepeat_TileMode, &s);
     fLinearGradientShader = make_linear_gradient_shader(squareLength);
 }