Accumulated non-substantive changes
Change-Id: I0c6f48da9acefcdd954c9b1b54501ef48465e537 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310980 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
2d403f203b
commit
326f1d702b
@ -87,23 +87,17 @@ static std::unique_ptr<GrFragmentProcessor> create_fp_for_mask(GrSurfaceProxyVie
|
||||
return GrDeviceSpaceEffect::Make(std::move(fp));
|
||||
}
|
||||
|
||||
// Does the path in 'element' require SW rendering? If so, return true (and,
|
||||
// optionally, set 'prOut' to NULL. If not, return false (and, optionally, set
|
||||
// 'prOut' to the non-SW path renderer that will do the job).
|
||||
// Does the path in 'element' require SW rendering?
|
||||
bool GrClipStackClip::PathNeedsSWRenderer(GrRecordingContext* context,
|
||||
const SkIRect& scissorRect,
|
||||
bool hasUserStencilSettings,
|
||||
const GrRenderTargetContext* renderTargetContext,
|
||||
const SkMatrix& viewMatrix,
|
||||
const Element* element,
|
||||
GrPathRenderer** prOut,
|
||||
bool needsStencil) {
|
||||
if (Element::DeviceSpaceType::kRect == element->getDeviceSpaceType()) {
|
||||
// rects can always be drawn directly w/o using the software path
|
||||
// TODO: skip rrects once we're drawing them directly.
|
||||
if (prOut) {
|
||||
*prOut = nullptr;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
// We shouldn't get here with an empty clip element.
|
||||
@ -140,9 +134,6 @@ bool GrClipStackClip::PathNeedsSWRenderer(GrRecordingContext* context,
|
||||
// the 'false' parameter disallows use of the SW path renderer
|
||||
GrPathRenderer* pr =
|
||||
context->priv().drawingManager()->getPathRenderer(canDrawArgs, false, type);
|
||||
if (prOut) {
|
||||
*prOut = pr;
|
||||
}
|
||||
return SkToBool(!pr);
|
||||
}
|
||||
}
|
||||
@ -185,7 +176,7 @@ bool GrClipStackClip::UseSWOnlyPath(GrRecordingContext* context,
|
||||
kIntersect_SkClipOp == op || kReverseDifference_SkClipOp == op;
|
||||
|
||||
if (PathNeedsSWRenderer(context, reducedClip.scissor(), hasUserStencilSettings,
|
||||
renderTargetContext, translate, element, nullptr, needsStencil)) {
|
||||
renderTargetContext, translate, element, needsStencil)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,6 @@ private:
|
||||
const GrRenderTargetContext*,
|
||||
const SkMatrix& viewMatrix,
|
||||
const SkClipStack::Element* element,
|
||||
GrPathRenderer** prOut,
|
||||
bool needsStencil);
|
||||
|
||||
bool applyClipMask(GrRecordingContext*, GrRenderTargetContext*, const GrReducedClip&,
|
||||
|
@ -30,17 +30,17 @@ public:
|
||||
virtual ~GrOnFlushCallbackObject() {}
|
||||
|
||||
/*
|
||||
* The onFlush callback allows subsystems (e.g., text, path renderers) to create atlases
|
||||
* The preFlush callback allows subsystems (e.g., text, path renderers) to create atlases
|
||||
* for a specific flush. All the GrOpsTask IDs required for the flush are passed into the
|
||||
* callback. The callback should return the render target contexts used to render the atlases
|
||||
* in 'results'.
|
||||
* callback.
|
||||
*/
|
||||
virtual void preFlush(GrOnFlushResourceProvider*, const uint32_t* opsTaskIDs,
|
||||
int numOpsTaskIDs) = 0;
|
||||
|
||||
/**
|
||||
* Called once flushing is complete and all ops indicated by preFlush have been executed and
|
||||
* released. startTokenForNextFlush can be used to track resources used in the current flush.
|
||||
* Called once flushing is complete and all opsTasks indicated by preFlush have been executed
|
||||
* and released. startTokenForNextFlush can be used to track resources used in the current
|
||||
* flush.
|
||||
*/
|
||||
virtual void postFlush(GrDeferredUploadToken startTokenForNextFlush,
|
||||
const uint32_t* opsTaskIDs, int numOpsTaskIDs) {}
|
||||
|
@ -114,7 +114,9 @@ private:
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&,
|
||||
GrXferBarrierFlags renderPassXferBarriers) override {
|
||||
// TODO [PI]: implement
|
||||
// We cannot surface the GrAtlasTextOp's programInfo at record time. As currently
|
||||
// implemented, the GP is modified at flush time based on the number of pages in the
|
||||
// atlas.
|
||||
}
|
||||
|
||||
void onPrePrepareDraws(GrRecordingContext*,
|
||||
|
@ -167,7 +167,9 @@ private:
|
||||
GrAppliedClip&&,
|
||||
const GrXferProcessor::DstProxyView&,
|
||||
GrXferBarrierFlags renderPassXferBarriers) override {
|
||||
// TODO [PI]: implement
|
||||
// We cannot surface the SmallPathOp's programInfo at record time. As currently
|
||||
// implemented, the GP is modified at flush time based on the number of pages in the
|
||||
// atlas.
|
||||
}
|
||||
|
||||
void onPrePrepareDraws(GrRecordingContext*,
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "src/core/SkUtils.h"
|
||||
#include "src/gpu/GrContextPriv.h"
|
||||
#include "src/gpu/GrGpu.h"
|
||||
#include "src/gpu/GrImageContextPriv.h"
|
||||
#include "src/gpu/GrRecordingContextPriv.h"
|
||||
#include "src/gpu/GrResourceCache.h"
|
||||
#include "src/gpu/GrTexture.h"
|
||||
@ -411,7 +412,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SkImage_makeTextureImage, reporter, contextIn
|
||||
if (!texImage) {
|
||||
auto imageContext = as_IB(image)->context();
|
||||
// We expect to fail if image comes from a different context
|
||||
if (!image->isTextureBacked() || imageContext == dContext) {
|
||||
if (!image->isTextureBacked() || imageContext->priv().matches(dContext)) {
|
||||
ERRORF(reporter, "makeTextureImage failed.");
|
||||
}
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user