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

Unified Diff: src/gpu/GrGpu.cpp

Issue 16952006: Replace fixed-size array of effect stages in GrDrawState with two appendable arrays, one for color,… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix comments Created 7 years, 6 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/GrGpu.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 0c58430dd1a96f4b64817116bcbb2fa24cb80bb5..ae98b54bea8dd054f2657b94d8fc75c17ab9ab1f 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -292,9 +292,9 @@ const GrIndexBuffer* GrGpu::getQuadIndexBuffer() const {
////////////////////////////////////////////////////////////////////////////////
-bool GrGpu::setupClipAndFlushState(DrawType type, const GrDeviceCoordTexture* dstCopy) {
-
- if (!fClipMaskManager.setupClipping(this->getClip())) {
+bool GrGpu::setupClipAndFlushState(DrawType type, const GrDeviceCoordTexture* dstCopy,
+ GrDrawState::AutoRestoreEffects* are) {
+ if (!fClipMaskManager.setupClipping(this->getClip(), are)) {
return false;
}
@@ -336,8 +336,10 @@ void GrGpu::geometrySourceWillPop(const GeometrySrcState& restoredState) {
void GrGpu::onDraw(const DrawInfo& info) {
this->handleDirtyContext();
+ GrDrawState::AutoRestoreEffects are;
if (!this->setupClipAndFlushState(PrimTypeToDrawType(info.primitiveType()),
- info.getDstCopy())) {
+ info.getDstCopy(),
+ &are)) {
return;
}
this->onGpuDraw(info);
@@ -350,7 +352,8 @@ void GrGpu::onStencilPath(const GrPath* path, const SkStrokeRec&, SkPath::FillTy
GrAutoTRestore<GrStencilSettings> asr(this->drawState()->stencil());
this->setStencilPathSettings(*path, fill, this->drawState()->stencil());
- if (!this->setupClipAndFlushState(kStencilPath_DrawType, NULL)) {
+ GrDrawState::AutoRestoreEffects are;
+ if (!this->setupClipAndFlushState(kStencilPath_DrawType, NULL, &are)) {
return;
}
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698