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

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 1974943002: Simplify GrSWMaskHelper (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix indent Created 4 years, 7 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 | « src/gpu/GrCaps.cpp ('k') | src/gpu/GrSWMaskHelper.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 c7b88caa244cef3abf9ae59abab5097f919af3a3..81da42c007c714fcf68aabc008c0104e4792c4ba 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -927,7 +927,7 @@ GrTexture* GrClipMaskManager::CreateSoftwareClipMask(GrContext* context,
SkMatrix translate;
translate.setTranslate(clipToMaskOffset);
- helper.init(maskSpaceIBounds, &translate, false);
+ helper.init(maskSpaceIBounds, &translate);
helper.clear(GrReducedClip::kAllIn_InitialState == initialState ? 0xFF : 0x00);
for (GrReducedClip::ElementList::Iter iter(elements.headIter()) ; iter.get(); iter.next()) {
@@ -942,24 +942,24 @@ GrTexture* GrClipMaskManager::CreateSoftwareClipMask(GrContext* context,
if (SkRegion::kReverseDifference_Op == op) {
SkRect temp = SkRect::Make(clipSpaceIBounds);
// invert the entire scene
- helper.draw(temp, SkRegion::kXOR_Op, false, 0xFF);
+ helper.drawRect(temp, SkRegion::kXOR_Op, false, 0xFF);
}
SkPath clipPath;
element->asPath(&clipPath);
clipPath.toggleInverseFillType();
- helper.draw(clipPath, GrStyle::SimpleFill(), SkRegion::kReplace_Op, element->isAA(),
- 0x00);
+ helper.drawPath(clipPath, GrStyle::SimpleFill(), SkRegion::kReplace_Op,
+ element->isAA(), 0x00);
continue;
}
// The other ops (union, xor, diff) only affect pixels inside
// the geometry so they can just be drawn normally
if (Element::kRect_Type == element->getType()) {
- helper.draw(element->getRect(), op, element->isAA(), 0xFF);
+ helper.drawRect(element->getRect(), op, element->isAA(), 0xFF);
} else {
SkPath path;
element->asPath(&path);
- helper.draw(path, GrStyle::SimpleFill(), op, element->isAA(), 0xFF);
+ helper.drawPath(path, GrStyle::SimpleFill(), op, element->isAA(), 0xFF);
}
}
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | src/gpu/GrSWMaskHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698