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

Unified Diff: src/gpu/GrGpu.cpp

Issue 678683005: Scissor rect on drawinfo (Closed) Base URL: https://skia.googlesource.com/skia.git@clip_to_target
Patch Set: rebase on master 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/gl/GrGpuGL.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 221aaec0702b6b3b262dd3bd7ef004362b9e7e97..5325aaeb3f5c8a87df4d69ad0be9e97ed00fadda 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -300,14 +300,19 @@ const GrIndexBuffer* GrGpu::getQuadIndexBuffer() const {
bool GrGpu::setupClipAndFlushState(DrawType type,
const GrDeviceCoordTexture* dstCopy,
- GrDrawState::AutoRestoreEffects* are,
- const SkRect* devBounds) {
- GrDrawState::AutoRestoreStencil asr;
- if (!fClipMaskManager.setupClipping(this->getClip(), are, &asr, devBounds)) {
+ const SkRect* devBounds,
+ GrDrawState::AutoRestoreEffects* are) {
+ ScissorState scissorState;
+ GrDrawState::AutoRestoreStencil ars;
+ if (!fClipMaskManager.setupClipping(this->getClip(),
+ devBounds,
+ are,
+ &ars,
+ &scissorState)) {
return false;
}
- if (!this->flushGraphicsState(type, dstCopy)) {
+ if (!this->flushGraphicsState(type, scissorState, dstCopy)) {
return false;
}
@@ -347,7 +352,9 @@ void GrGpu::onDraw(const DrawInfo& info) {
this->handleDirtyContext();
GrDrawState::AutoRestoreEffects are;
if (!this->setupClipAndFlushState(PrimTypeToDrawType(info.primitiveType()),
- info.getDstCopy(), &are, info.getDevBounds())) {
+ info.getDstCopy(),
+ info.getDevBounds(),
+ &are)) {
return;
}
this->onGpuDraw(info);
@@ -357,7 +364,7 @@ void GrGpu::onStencilPath(const GrPath* path, SkPath::FillType fill) {
this->handleDirtyContext();
GrDrawState::AutoRestoreEffects are;
- if (!this->setupClipAndFlushState(kStencilPath_DrawType, NULL, &are, NULL)) {
+ if (!this->setupClipAndFlushState(kStencilPath_DrawType, NULL, NULL, &are)) {
return;
}
@@ -372,7 +379,7 @@ void GrGpu::onDrawPath(const GrPath* path, SkPath::FillType fill,
drawState()->setDefaultVertexAttribs();
GrDrawState::AutoRestoreEffects are;
- if (!this->setupClipAndFlushState(kDrawPath_DrawType, dstCopy, &are, NULL)) {
+ if (!this->setupClipAndFlushState(kDrawPath_DrawType, dstCopy, NULL, &are)) {
return;
}
@@ -388,7 +395,7 @@ void GrGpu::onDrawPaths(const GrPathRange* pathRange,
drawState()->setDefaultVertexAttribs();
GrDrawState::AutoRestoreEffects are;
- if (!this->setupClipAndFlushState(kDrawPaths_DrawType, dstCopy, &are, NULL)) {
+ if (!this->setupClipAndFlushState(kDrawPaths_DrawType, dstCopy, NULL, &are)) {
return;
}
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698