From 87ae9895692e4a97873a510178003d1ba70ab79a Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Thu, 24 Aug 2017 21:28:04 +0000 Subject: Revert "Threaded generation of software paths" This reverts commit 76323bc0615044a5921afef0e19a350f3d04ffe0. Reason for revert: Breaking NUC bots in threaded gm comparison: https://chromium-swarm.appspot.com/task?id=382e589753187f10&refresh=10 Original change's description: > Threaded generation of software paths > > All information needed by the thread is captured by the prepare > callback object, the lambda captures a pointer to that, and does the > mask render. Once it's done, it signals the semaphore (also owned by the > callback). The callback defers the semaphore wait even longer (into the > ASAP upload), so the odds of waiting for the thread are REALLY low. > > Also did a bunch of cleanup along the way, and put in some trace markers > so we can monitor how well this is working. > > Traces of a GM that includes GPU and SW path rendering (path-reverse): > > Original: > https://screenshot.googleplex.com/f5BG3901tQg.png > Threaded, with wait in the callback (notice pre flush callback blocking): > https://screenshot.googleplex.com/htOSZFE2s04.png > Current version, with wait deferred to ASAP upload function: > https://screenshot.googleplex.com/GHjD0U3C34q.png > > Bug: skia: > Change-Id: I3d5a230bbd68eb35e1f0574b308485c691435790 > Reviewed-on: https://skia-review.googlesource.com/36560 > Commit-Queue: Brian Osman > Reviewed-by: Brian Salomon TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com Change-Id: Icac0918a3771859f671b69ae07ae0fedd3ebb3db No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/38560 Reviewed-by: Brian Salomon Commit-Queue: Brian Salomon --- dm/DMSrcSink.h | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'dm/DMSrcSink.h') diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h index 8b6ee0e5f4..117514995a 100644 --- a/dm/DMSrcSink.h +++ b/dm/DMSrcSink.h @@ -310,9 +310,6 @@ public: bool threaded, const GrContextOptions& grCtxOptions); Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; - Error onDraw(const Src&, SkBitmap*, SkWStream*, SkString*, - const GrContextOptions& baseOptions) const; - bool serial() const override { return !fThreaded; } const char* fileExtension() const override { return "png"; } SinkFlags flags() const override { @@ -320,8 +317,6 @@ public: : SinkFlags::kNotMultisampled; return SinkFlags{ SinkFlags::kGPU, SinkFlags::kDirect, ms }; } - const GrContextOptions& baseContextOptions() const { return fBaseContextOptions; } - private: sk_gpu_test::GrContextFactory::ContextType fContextType; sk_gpu_test::GrContextFactory::ContextOverrides fContextOverrides; @@ -334,22 +329,6 @@ private: GrContextOptions fBaseContextOptions; }; -class GPUThreadTestingSink : public GPUSink { -public: - GPUThreadTestingSink(sk_gpu_test::GrContextFactory::ContextType, - sk_gpu_test::GrContextFactory::ContextOverrides, int samples, bool diText, - SkColorType colorType, SkAlphaType alphaType, - sk_sp colorSpace, bool threaded, - const GrContextOptions& grCtxOptions); - - Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; - -private: - std::unique_ptr fExecutor; - - typedef GPUSink INHERITED; -}; - class PDFSink : public Sink { public: PDFSink(bool pdfa, SkScalar rasterDpi) : fPDFA(pdfa), fRasterDpi(rasterDpi) {} -- cgit v1.2.3