aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-04-03 11:11:09 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-03 15:50:16 +0000
commit887cdf112809727c51890ba8b98b3ddce22249f0 (patch)
tree6ae2774f9ec869f72cf117993eba25c6ef97e28b /tools
parentb55dd553124cd00260bc9e3a63ec8a8fe09412a8 (diff)
move vertex-mode enum into SkVertices
BUG=skia:6366 Change-Id: I3c0bf96cce6d32c9b8d12d16a772aaa6f18981aa Reviewed-on: https://skia-review.googlesource.com/11062 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/viewer/Viewer.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index fecb14d59d..de4c6e0cbf 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -33,6 +33,7 @@
#include "SkSwizzle.h"
#include "SkTaskGroup.h"
#include "SkTime.h"
+#include "SkVertices.h"
#include "imgui.h"
@@ -1209,10 +1210,12 @@ void Viewer::drawImGui(SkCanvas* canvas) {
canvas->save();
canvas->clipRect(SkRect::MakeLTRB(drawCmd->ClipRect.x, drawCmd->ClipRect.y,
drawCmd->ClipRect.z, drawCmd->ClipRect.w));
- canvas->drawVertices(SkCanvas::kTriangles_VertexMode, drawList->VtxBuffer.size(),
- pos.begin(), uv.begin(), color.begin(),
- drawList->IdxBuffer.begin() + indexOffset, drawCmd->ElemCount,
- *paint);
+ canvas->drawVertices(SkVertices::MakeCopy(SkVertices::kTriangles_VertexMode,
+ drawList->VtxBuffer.size(), pos.begin(),
+ uv.begin(), color.begin(),
+ drawCmd->ElemCount,
+ drawList->IdxBuffer.begin() + indexOffset),
+ SkBlendMode::kModulate, *paint);
indexOffset += drawCmd->ElemCount;
canvas->restore();
}