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

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 148283017: Make GMs aware of what tool they're being run in. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: w to this->getMode() Created 6 years, 10 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 | « samplecode/SampleApp.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskManager.cpp
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index c1c59734ab50b6f133891dd388583bd68dc15fce..adb6ceee46c9d9165e68e54154ae4e9800f68263 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -158,18 +158,23 @@ bool GrClipMaskManager::setupClipping(const GrClipData* clipDataIn,
// clips against the edges.
if (1 == elements.count() && SkClipStack::Element::kPath_Type == elements.tail()->getType() &&
SkRegion::kReplace_Op == elements.tail()->getOp()) {
- const SkPath& p = elements.tail()->getPath();
+ const SkPath& path = elements.tail()->getPath();
bool isAA = GR_AA_CLIP && elements.tail()->isAA();
SkAutoTUnref<GrEffectRef> effect;
if (rt->isMultisampled()) {
// A coverage effect for AA clipping won't play nicely with MSAA.
if (!isAA) {
- effect.reset(GrConvexPolyEffect::Create(GrConvexPolyEffect::kFillNoAA_EdgeType, p));
+ SkVector offset = { SkIntToScalar(-clipDataIn->fOrigin.fX),
+ SkIntToScalar(-clipDataIn->fOrigin.fY) };
+ effect.reset(GrConvexPolyEffect::Create(GrConvexPolyEffect::kFillNoAA_EdgeType,
+ path, &offset));
}
} else {
+ SkVector offset = { SkIntToScalar(-clipDataIn->fOrigin.fX),
+ SkIntToScalar(-clipDataIn->fOrigin.fY) };
GrConvexPolyEffect::EdgeType type = isAA ? GrConvexPolyEffect::kFillAA_EdgeType :
GrConvexPolyEffect::kFillNoAA_EdgeType;
- effect.reset(GrConvexPolyEffect::Create(type, p));
+ effect.reset(GrConvexPolyEffect::Create(type, path, &offset));
}
if (effect) {
are->set(fGpu->drawState());
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698