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

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 1083133002: Rename GrStencilBuffer to GrStencilAttachment (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Align data member Created 5 years, 8 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/GrClipMaskManager.h ('k') | src/gpu/GrContext.cpp » ('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 2f6f635d043eebe3ea6f14d5c30bf35fa6902645..078895d7e3e8f216854b62099909df5fc22896a4 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -14,7 +14,7 @@
#include "GrPathRenderer.h"
#include "GrRenderTarget.h"
#include "GrRenderTargetPriv.h"
-#include "GrStencilBuffer.h"
+#include "GrStencilAttachment.h"
#include "GrSWMaskHelper.h"
#include "SkRasterClip.h"
#include "SkStrokeRec.h"
@@ -706,13 +706,13 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt,
SkASSERT(kNone_ClipMaskType == fCurrClipMaskType);
SkASSERT(rt);
- GrStencilBuffer* stencilBuffer = rt->renderTargetPriv().attachStencilBuffer();
- if (NULL == stencilBuffer) {
+ GrStencilAttachment* stencilAttachment = rt->renderTargetPriv().attachStencilAttachment();
+ if (NULL == stencilAttachment) {
return false;
}
- if (stencilBuffer->mustRenderClip(elementsGenID, clipSpaceIBounds, clipSpaceToStencilOffset)) {
- stencilBuffer->setLastClip(elementsGenID, clipSpaceIBounds, clipSpaceToStencilOffset);
+ if (stencilAttachment->mustRenderClip(elementsGenID, clipSpaceIBounds, clipSpaceToStencilOffset)) {
+ stencilAttachment->setLastClip(elementsGenID, clipSpaceIBounds, clipSpaceToStencilOffset);
// Set the matrix so that rendered clip elements are transformed from clip to stencil space.
SkVector translate = {
SkIntToScalar(clipSpaceToStencilOffset.fX),
@@ -726,7 +726,7 @@ bool GrClipMaskManager::createStencilClipMask(GrRenderTarget* rt,
stencilSpaceIBounds.offset(clipSpaceToStencilOffset);
GrClip clip(stencilSpaceIBounds);
- int clipBit = stencilBuffer->bits();
+ int clipBit = stencilAttachment->bits();
SkASSERT((clipBit <= 16) && "Ganesh only handles 16b or smaller stencil buffers");
clipBit = (1 << (clipBit-1));
@@ -952,9 +952,9 @@ void GrClipMaskManager::setPipelineBuilderStencil(GrPipelineBuilder* pipelineBui
int stencilBits = 0;
GrRenderTarget* rt = pipelineBuilder->getRenderTarget();
- GrStencilBuffer* stencilBuffer = rt->renderTargetPriv().attachStencilBuffer();
- if (stencilBuffer) {
- stencilBits = stencilBuffer->bits();
+ GrStencilAttachment* stencilAttachment = rt->renderTargetPriv().attachStencilAttachment();
+ if (stencilAttachment) {
+ stencilBits = stencilAttachment->bits();
}
SkASSERT(fClipTarget->caps()->stencilWrapOpsSupport() || !settings.usesWrapOp());
@@ -1127,10 +1127,10 @@ void GrClipMaskManager::setClipTarget(GrClipTarget* clipTarget) {
fAACache.setContext(clipTarget->getContext());
}
-void GrClipMaskManager::adjustPathStencilParams(const GrStencilBuffer* stencilBuffer,
+void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stencilAttachment,
GrStencilSettings* settings) {
- if (stencilBuffer) {
- int stencilBits = stencilBuffer->bits();
+ if (stencilAttachment) {
+ int stencilBits = stencilAttachment->bits();
this->adjustStencilParams(settings, fClipMode, stencilBits);
}
}
« no previous file with comments | « src/gpu/GrClipMaskManager.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698