Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Unified Diff: tools/android/SkAndroidSDKCanvas.cpp

Issue 2395273002: Assorted Android fixes (Closed)
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/android/SkAndroidSDKCanvas.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/SkAndroidSDKCanvas.cpp
diff --git a/tools/android/SkAndroidSDKCanvas.cpp b/tools/android/SkAndroidSDKCanvas.cpp
index 44ceccb15c7cb69970109a575308b68e9dc692f1..f205ac49ca7070970c1b4edc3f9016a54b57a205 100644
--- a/tools/android/SkAndroidSDKCanvas.cpp
+++ b/tools/android/SkAndroidSDKCanvas.cpp
@@ -25,7 +25,7 @@ void CheckShader(SkPaint* paint) {
return;
}
- if (shader->isABitmap()) {
+ if (shader->isAImage()) {
return;
}
if (shader->asACompose(nullptr)) {
@@ -46,11 +46,9 @@ void Filter(SkPaint* paint) {
flags &= ~SkPaint::kLCDRenderText_Flag;
paint->setFlags(flags);
- // Android doesn't support Xfermodes above kLighten_Mode
- SkXfermode::Mode mode;
- SkXfermode::AsMode(paint->getXfermode(), &mode);
- if (mode > SkXfermode::kLighten_Mode) {
- paint->setXfermode(nullptr);
+ // Android doesn't support blend modes above kLighten_Mode
+ if (paint->getBlendMode() > SkBlendMode::kLighten) {
+ paint->setBlendMode(SkBlendMode::kSrcOver);
}
// Force bilinear scaling or none
@@ -344,24 +342,24 @@ void SkAndroidSDKCanvas::didSetMatrix(const SkMatrix& m) {
}
void SkAndroidSDKCanvas::onClipRect(const SkRect& rect,
- SkRegion::Op op,
+ ClipOp op,
ClipEdgeStyle style) {
fProxyTarget->clipRect(rect, op, style);
}
void SkAndroidSDKCanvas::onClipRRect(const SkRRect& rrect,
- SkRegion::Op op,
+ ClipOp op,
ClipEdgeStyle style) {
fProxyTarget->clipRRect(rrect, op, style);
}
void SkAndroidSDKCanvas::onClipPath(const SkPath& path,
- SkRegion::Op op,
+ ClipOp op,
ClipEdgeStyle style) {
fProxyTarget->clipPath(path, op, style);
}
-void SkAndroidSDKCanvas::onClipRegion(const SkRegion& region, SkRegion::Op op) {
+void SkAndroidSDKCanvas::onClipRegion(const SkRegion& region, ClipOp op) {
fProxyTarget->clipRegion(region, op);
}
« no previous file with comments | « tools/android/SkAndroidSDKCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698