Revert "Simplify GrRTC::clean APIs"
This reverts commit 6cbd7c2e57af9c499f7e99feb215b890fdd3a10a.
Reason for revert: mac/generated files failures
Original change's description:
> Simplify GrRTC::clean APIs
>
> The CanClearFullscreen enum type is removed. Most usages of clear() had
> kYes because a null scissor rect was provided, or had kNo because the
> scissor was really critical to the behavior. A few places did provide a
> scissor and kYes (e.g. for initializing the target).
>
> To simplify this, the public GrRTC has two variants of clear(). One with
> only a color (for fullscreen clears), and one with a rect for partial
> clears. The private API also adds a clearAtLeast() function that replaces
> the several cases where we'd have a scissor but could expand to fullscreen.
>
> I find the current control flow in internalClear() to be hard to
> follow (albeit I was the one to make it that way...), but later CLs
> will improve it.
>
> Bug: skia:10205
> Change-Id: I87cf8d688c58fbe58ee854fbc4ffe22482d969c6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290256
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,csmartdalton@google.com,michaelludwig@google.com
Change-Id: I7131df6f5323f4f9c120cbcfd9bc57e627e2eb65
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10205
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291842
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/GrDynamicAtlas.cpp b/src/gpu/GrDynamicAtlas.cpp
index 2bc309b..881d439 100644
--- a/src/gpu/GrDynamicAtlas.cpp
+++ b/src/gpu/GrDynamicAtlas.cpp
@@ -13,7 +13,7 @@
#include "src/gpu/GrRectanizerPow2.h"
#include "src/gpu/GrRectanizerSkyline.h"
#include "src/gpu/GrRenderTarget.h"
-#include "src/gpu/GrRenderTargetContextPriv.h"
+#include "src/gpu/GrRenderTargetContext.h"
// Each Node covers a sub-rectangle of the final atlas. When a GrDynamicAtlas runs out of room, we
// create a new Node the same size as all combined nodes in the atlas as-is, and then place the new
@@ -199,6 +199,7 @@
}
SkIRect clearRect = SkIRect::MakeSize(fDrawBounds);
- rtc->priv().clearAtLeast(clearRect, SK_PMColor4fTRANSPARENT);
+ rtc->clear(&clearRect, SK_PMColor4fTRANSPARENT,
+ GrRenderTargetContext::CanClearFullscreen::kYes);
return rtc;
}