aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/debugger
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2016-10-03 12:57:32 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-03 17:17:10 +0000
commit0591897548c8fcb7d53cc94053e01702e58f1ac5 (patch)
tree099bf31c7bf4bd3062d2e7a8b4268a89f1fd61a2 /tools/debugger
parenta224bb7027f022cf78376cb7afa2fff83d59153e (diff)
replace SkXfermode obj with SkBlendMode enum in paints
BUG=skia:5814 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2714 Change-Id: I4fb489ba6b3f77b458f7e4a99f79c7ad10859135 Reviewed-on: https://skia-review.googlesource.com/2714 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'tools/debugger')
-rw-r--r--tools/debugger/SkDebugCanvas.cpp3
-rw-r--r--tools/debugger/SkDrawCommand.cpp23
2 files changed, 2 insertions, 24 deletions
diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp
index f15c68c869..1da995b284 100644
--- a/tools/debugger/SkDebugCanvas.cpp
+++ b/tools/debugger/SkDebugCanvas.cpp
@@ -42,7 +42,8 @@ protected:
if (*paint) {
if (nullptr != fOverdrawXfermode.get()) {
paint->writable()->setAntiAlias(false);
- paint->writable()->setXfermode(fOverdrawXfermode);
+ // TODO: replace overdraw mode with something else
+// paint->writable()->setXfermode(fOverdrawXfermode);
}
if (fOverrideFilterQuality) {
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp
index ba6302ca3a..156ca4f74d 100644
--- a/tools/debugger/SkDrawCommand.cpp
+++ b/tools/debugger/SkDrawCommand.cpp
@@ -1116,16 +1116,6 @@ static void apply_paint_shader(const SkPaint& paint, Json::Value* target,
}
}
-static void apply_paint_xfermode(const SkPaint& paint, Json::Value* target,
- UrlDataManager& urlDataManager) {
- SkFlattenable* xfermode = paint.getXfermode();
- if (xfermode != nullptr) {
- Json::Value jsonXfermode;
- SkDrawCommand::flatten(xfermode, &jsonXfermode, urlDataManager);
- (*target)[SKDEBUGCANVAS_ATTRIBUTE_XFERMODE] = jsonXfermode;
- }
-}
-
static void apply_paint_imagefilter(const SkPaint& paint, Json::Value* target,
UrlDataManager& urlDataManager) {
SkFlattenable* imageFilter = paint.getImageFilter();
@@ -1177,7 +1167,6 @@ Json::Value SkDrawCommand::MakeJsonPaint(const SkPaint& paint, UrlDataManager& u
apply_paint_patheffect(paint, &result, urlDataManager);
apply_paint_maskfilter(paint, &result, urlDataManager);
apply_paint_shader(paint, &result, urlDataManager);
- apply_paint_xfermode(paint, &result, urlDataManager);
apply_paint_looper(paint, &result, urlDataManager);
apply_paint_imagefilter(paint, &result, urlDataManager);
apply_paint_colorfilter(paint, &result, urlDataManager);
@@ -1246,17 +1235,6 @@ static void extract_json_paint_colorfilter(Json::Value& jsonPaint, UrlDataManage
}
}
-static void extract_json_paint_xfermode(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
- SkPaint* target) {
- if (jsonPaint.isMember(SKDEBUGCANVAS_ATTRIBUTE_XFERMODE)) {
- Json::Value jsonXfermode = jsonPaint[SKDEBUGCANVAS_ATTRIBUTE_XFERMODE];
- sk_sp<SkXfermode> xfermode((SkXfermode*) load_flattenable(jsonXfermode, urlDataManager));
- if (xfermode != nullptr) {
- target->setXfermode(xfermode);
- }
- }
-}
-
static void extract_json_paint_looper(Json::Value& jsonPaint, UrlDataManager& urlDataManager,
SkPaint* target) {
if (jsonPaint.isMember(SKDEBUGCANVAS_ATTRIBUTE_LOOPER)) {
@@ -1503,7 +1481,6 @@ static void extract_json_paint(Json::Value& paint, UrlDataManager& urlDataManage
extract_json_paint_patheffect(paint, urlDataManager, result);
extract_json_paint_maskfilter(paint, urlDataManager, result);
extract_json_paint_colorfilter(paint, urlDataManager, result);
- extract_json_paint_xfermode(paint, urlDataManager, result);
extract_json_paint_looper(paint, urlDataManager, result);
extract_json_paint_imagefilter(paint, urlDataManager, result);
extract_json_paint_typeface(paint, urlDataManager, result);