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

Unified Diff: src/gpu/GrGpuCommandBuffer.cpp

Issue 2262473003: Define clear regions in terms of GrFixedClip (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_fixedcliptosrc
Patch Set: rebase Created 4 years, 4 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/GrGpuCommandBuffer.h ('k') | src/gpu/GrPathRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpuCommandBuffer.cpp
diff --git a/src/gpu/GrGpuCommandBuffer.cpp b/src/gpu/GrGpuCommandBuffer.cpp
index af0993e033133c4336b493e0b922d65ec36bcdeb..022c16696fd24de3a68b44cd8293df3924f06d82 100644
--- a/src/gpu/GrGpuCommandBuffer.cpp
+++ b/src/gpu/GrGpuCommandBuffer.cpp
@@ -8,6 +8,7 @@
#include "GrGpuCommandBuffer.h"
#include "GrCaps.h"
+#include "GrFixedClip.h"
#include "GrGpu.h"
#include "GrPrimitiveProcessor.h"
#include "GrRenderTarget.h"
@@ -18,17 +19,19 @@ void GrGpuCommandBuffer::submit(const SkIRect& bounds) {
this->onSubmit(bounds);
}
-void GrGpuCommandBuffer::clear(const SkIRect& rect, GrColor color, GrRenderTarget* renderTarget) {
- SkASSERT(renderTarget);
- SkASSERT(SkIRect::MakeWH(renderTarget->width(), renderTarget->height()).contains(rect));
- this->onClear(renderTarget, rect, color);
+void GrGpuCommandBuffer::clear(const GrFixedClip& clip, GrColor color, GrRenderTarget* rt) {
+ SkASSERT(rt);
+ SkASSERT(!clip.scissorEnabled() ||
+ (SkIRect::MakeWH(rt->width(), rt->height()).contains(clip.scissorRect()) &&
+ SkIRect::MakeWH(rt->width(), rt->height()) != clip.scissorRect()));
+ this->onClear(rt, clip, color);
}
-void GrGpuCommandBuffer::clearStencilClip(const SkIRect& rect,
- bool insideClip,
- GrRenderTarget* renderTarget) {
- SkASSERT(renderTarget);
- this->onClearStencilClip(renderTarget, rect, insideClip);
+void GrGpuCommandBuffer::clearStencilClip(const GrFixedClip& clip,
+ bool insideStencilMask,
+ GrRenderTarget* rt) {
+ SkASSERT(rt);
+ this->onClearStencilClip(rt, clip, insideStencilMask);
}
« no previous file with comments | « src/gpu/GrGpuCommandBuffer.h ('k') | src/gpu/GrPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698