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

Unified Diff: tools/android/SkAndroidSDKCanvas.cpp

Issue 2464433003: update androidsdkcanvas for SkBlendMode (Closed)
Patch Set: rebase Created 4 years, 1 month 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 f205ac49ca7070970c1b4edc3f9016a54b57a205..4db8acd6b381dbbb7ed55b02881002a904e90d29 100644
--- a/tools/android/SkAndroidSDKCanvas.cpp
+++ b/tools/android/SkAndroidSDKCanvas.cpp
@@ -63,12 +63,12 @@ void Filter(SkPaint* paint) {
SkColorFilter* cf = paint->getColorFilter();
if (cf) {
SkColor color;
- SkXfermode::Mode mode;
+ SK_XFERMODE_MODE_PARAM mode;
SkScalar srcColorMatrix[20];
bool isMode = cf->asColorMode(&color, &mode);
- if (isMode && mode > SkXfermode::kLighten_Mode) {
+ if (isMode && (int)mode > (int)SkBlendMode::kLighten) {
paint->setColorFilter(
- SkColorFilter::MakeModeFilter(color, SkXfermode::kSrcOver_Mode));
+ SkColorFilter::MakeModeFilter(color, SkBlendMode::kSrcOver));
} else if (!isMode && !cf->asColorMatrix(srcColorMatrix)) {
paint->setColorFilter(nullptr);
}
@@ -164,7 +164,7 @@ void SkAndroidSDKCanvas::onDrawBitmapNine(const SkBitmap& bitmap,
void SkAndroidSDKCanvas::onDrawVertices(VertexMode vMode,
int vertexCount,
const SkPoint vertices[],
- const SkPoint texs[], const SkColor colors[], SkXfermode* xMode,
+ const SkPoint texs[], const SkColor colors[], SK_XFERMODE_PARAM xMode,
const uint16_t indices[], int indexCount,
const SkPaint& paint) {
FILTER(paint);
@@ -227,7 +227,7 @@ void SkAndroidSDKCanvas::onDrawTextBlob(const SkTextBlob* blob,
void SkAndroidSDKCanvas::onDrawPatch(const SkPoint cubics[12],
const SkColor colors[4],
const SkPoint texCoords[4],
- SkXfermode* xmode,
+ SK_XFERMODE_PARAM xmode,
const SkPaint& paint) {
FILTER(paint);
fProxyTarget->drawPatch(cubics, colors, texCoords, xmode, filteredPaint);
@@ -263,7 +263,7 @@ void SkAndroidSDKCanvas::onDrawAtlas(const SkImage* atlas,
const SkRect tex[],
const SkColor colors[],
int count,
- SkXfermode::Mode mode,
+ SK_XFERMODE_MODE_PARAM mode,
const SkRect* cullRect,
const SkPaint* paint) {
FILTER_PTR(paint);
« 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