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

Unified Diff: src/gpu/GrGpu.cpp

Issue 683673002: clear stencil clip on draw target (Closed) Base URL: https://skia.googlesource.com/skia.git@aa_rect_takes_gpu
Patch Set: rebase Created 6 years, 2 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/GrInOrderDrawBuffer.h » ('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 7e8c4c82dd57de78236ef7f57caf91a948940d58..e767d07a829467a9d442402babcabaedd90516fc 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -28,7 +28,7 @@ static const int INDEX_POOL_IB_COUNT = 4;
#define DEBUG_INVAL_START_IDX -1
GrGpu::GrGpu(GrContext* context)
- : GrDrawTarget(context)
+ : INHERITED(context)
, fResetTimestamp(kExpiredTimestamp+1)
, fResetBits(kAll_GrBackendState)
, fVertexPool(NULL)
@@ -212,6 +212,20 @@ void GrGpu::clear(const SkIRect* rect,
this->onClear(renderTarget, rect, color, canIgnoreRect);
}
+void GrGpu::clearStencilClip(const SkIRect& rect,
+ bool insideClip,
+ GrRenderTarget* renderTarget) {
+ if (NULL == renderTarget) {
+ renderTarget = this->getDrawState().getRenderTarget();
+ }
+ if (NULL == renderTarget) {
+ SkASSERT(0);
+ return;
+ }
+ this->handleDirtyContext();
+ this->onClearStencilClip(renderTarget, rect, insideClip);
+}
+
bool GrGpu::readPixels(GrRenderTarget* target,
int left, int top, int width, int height,
GrPixelConfig config, void* buffer,
@@ -302,7 +316,7 @@ bool GrGpu::setupClipAndFlushState(DrawType type,
const GrDeviceCoordTexture* dstCopy,
const SkRect* devBounds,
GrDrawState::AutoRestoreEffects* are) {
- ScissorState scissorState;
+ GrClipMaskManager::ScissorState scissorState;
GrDrawState::AutoRestoreStencil ars;
if (!fClipMaskManager.setupClipping(this->getClip(),
devBounds,
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698