diff options
author | Robert Phillips <robertphillips@google.com> | 2017-12-04 14:38:06 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-04 14:38:15 +0000 |
commit | 8172c0a24a79f9b4c3e48c79759f0e0f7059ddf5 (patch) | |
tree | dc74901cce0149c60823e53a840d5c30318ac142 /src | |
parent | 3e794595fdcb90f47e80cd8c69f0a1f09176efa2 (diff) |
Revert "Add unit test for SkDeferredDisplayLists"
This reverts commit 8458a2807b4a7220c9849f8032dc611438818641.
Reason for revert: ??
Original change's description:
> Add unit test for SkDeferredDisplayLists
>
> Change-Id: I015094145cb0af6cfe368c570a5d5280c11c8f28
> Reviewed-on: https://skia-review.googlesource.com/78660
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: Iec3abb18d3ed41fcfbec72bc2de14603f659f8ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/79720
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkDeferredDisplayListRecorder.cpp | 3 | ||||
-rw-r--r-- | src/image/SkSurface.cpp | 2 | ||||
-rw-r--r-- | src/image/SkSurface_Base.h | 2 | ||||
-rw-r--r-- | src/image/SkSurface_Gpu.cpp | 10 | ||||
-rw-r--r-- | src/image/SkSurface_Gpu.h | 2 |
5 files changed, 9 insertions, 10 deletions
diff --git a/src/core/SkDeferredDisplayListRecorder.cpp b/src/core/SkDeferredDisplayListRecorder.cpp index f6981e7535..18e516ab31 100644 --- a/src/core/SkDeferredDisplayListRecorder.cpp +++ b/src/core/SkDeferredDisplayListRecorder.cpp @@ -43,7 +43,6 @@ std::unique_ptr<SkDeferredDisplayList> SkDeferredDisplayListRecorder::detach() { // Placeholder. Ultimately, the SkSurface_Gpu will pass the wrapped opLists to its // renderTargetContext. -bool SkDeferredDisplayList::draw(SkSurface* surface) { +void SkDeferredDisplayList::draw(SkSurface* surface) { surface->getCanvas()->drawImage(fImage.get(), 0, 0); - return true; } diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp index 9cef76f236..04e16f6281 100644 --- a/src/image/SkSurface.cpp +++ b/src/image/SkSurface.cpp @@ -213,7 +213,7 @@ bool SkSurface::characterize(SkSurfaceCharacterization* characterization) const return asSB(const_cast<SkSurface*>(this))->onCharacterize(characterization); } -bool SkSurface::draw(SkDeferredDisplayList* ddl) { +void SkSurface::draw(SkDeferredDisplayList* ddl) { return asSB(this)->onDraw(ddl); } diff --git a/src/image/SkSurface_Base.h b/src/image/SkSurface_Base.h index b71d4c7043..e05d371cd8 100644 --- a/src/image/SkSurface_Base.h +++ b/src/image/SkSurface_Base.h @@ -95,7 +95,7 @@ public: } virtual bool onCharacterize(SkSurfaceCharacterization*) const { return false; } - virtual bool onDraw(SkDeferredDisplayList*) { return false; } + virtual void onDraw(SkDeferredDisplayList*) { } inline SkCanvas* getCachedCanvas(); inline sk_sp<SkImage> refCachedImage(); diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp index dc1f308512..605f229023 100644 --- a/src/image/SkSurface_Gpu.cpp +++ b/src/image/SkSurface_Gpu.cpp @@ -165,7 +165,7 @@ bool SkSurface_Gpu::onCharacterize(SkSurfaceCharacterization* data) const { GrContext* ctx = fDevice->context(); data->set(ctx->threadSafeProxy(), rtc->origin(), rtc->width(), rtc->height(), - rtc->colorSpaceInfo().config(), rtc->fsaaType(), rtc->numStencilSamples(), + rtc->colorSpaceInfo().config(), rtc->numColorSamples(), rtc->colorSpaceInfo().refColorSpace(), this->props()); return true; @@ -178,19 +178,19 @@ bool SkSurface_Gpu::isCompatible(const SkSurfaceCharacterization& data) const { return data.contextInfo() && data.contextInfo()->matches(ctx) && data.origin() == rtc->origin() && data.width() == rtc->width() && data.height() == rtc->height() && data.config() == rtc->colorSpaceInfo().config() && - data.fsaaType() == rtc->fsaaType() && data.stencilCount() == rtc->numStencilSamples() && + data.sampleCount() == rtc->numColorSamples() && SkColorSpace::Equals(data.colorSpace(), rtc->colorSpaceInfo().colorSpace()) && data.surfaceProps() == rtc->surfaceProps(); } -bool SkSurface_Gpu::onDraw(SkDeferredDisplayList* dl) { +void SkSurface_Gpu::onDraw(SkDeferredDisplayList* dl) { if (!this->isCompatible(dl->characterization())) { - return false; + return; } // Ultimately need to pass opLists from the DeferredDisplayList on to the // SkGpuDevice's renderTargetContext. - return dl->draw(this); + dl->draw(this); } diff --git a/src/image/SkSurface_Gpu.h b/src/image/SkSurface_Gpu.h index cb21771aa9..c95966370c 100644 --- a/src/image/SkSurface_Gpu.h +++ b/src/image/SkSurface_Gpu.h @@ -31,7 +31,7 @@ public: bool onWait(int numSemaphores, const GrBackendSemaphore* waitSemaphores) override; bool onCharacterize(SkSurfaceCharacterization*) const override; bool isCompatible(const SkSurfaceCharacterization&) const; - bool onDraw(SkDeferredDisplayList*) override; + void onDraw(SkDeferredDisplayList*) override; SkGpuDevice* getDevice() { return fDevice.get(); } |