summaryrefslogtreecommitdiff
path: root/libs/hwui/tests/common/scenes/BitmapShaders.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/tests/common/scenes/BitmapShaders.cpp')
-rw-r--r--libs/hwui/tests/common/scenes/BitmapShaders.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/libs/hwui/tests/common/scenes/BitmapShaders.cpp b/libs/hwui/tests/common/scenes/BitmapShaders.cpp
index e2c1651d823a..c4067af388e3 100644
--- a/libs/hwui/tests/common/scenes/BitmapShaders.cpp
+++ b/libs/hwui/tests/common/scenes/BitmapShaders.cpp
@@ -18,7 +18,6 @@
#include "hwui/Paint.h"
#include "TestSceneBase.h"
#include "tests/common/BitmapAllocationTestUtils.h"
-#include <shader/BitmapShader.h>
#include "utils/Color.h"
class BitmapShaders;
@@ -46,24 +45,15 @@ public:
});
Paint paint;
- sk_sp<BitmapShader> bitmapShader = sk_make_sp<BitmapShader>(
- hwuiBitmap->makeImage(),
- SkTileMode::kRepeat,
- SkTileMode::kRepeat,
- nullptr
- );
-
sk_sp<SkImage> image = hwuiBitmap->makeImage();
- paint.setShader(std::move(bitmapShader));
+ sk_sp<SkShader> repeatShader =
+ image->makeShader(SkTileMode::kRepeat, SkTileMode::kRepeat);
+ paint.setShader(std::move(repeatShader));
canvas.drawRoundRect(0, 0, 500, 500, 50.0f, 50.0f, paint);
- sk_sp<BitmapShader> mirrorBitmapShader = sk_make_sp<BitmapShader>(
- image,
- SkTileMode::kMirror,
- SkTileMode::kMirror,
- nullptr
- );
- paint.setShader(std::move(mirrorBitmapShader));
+ sk_sp<SkShader> mirrorShader =
+ image->makeShader(SkTileMode::kMirror, SkTileMode::kMirror);
+ paint.setShader(std::move(mirrorShader));
canvas.drawRoundRect(0, 600, 500, 1100, 50.0f, 50.0f, paint);
}