diff options
author | Greg Daniel <egdaniel@google.com> | 2018-07-02 20:15:37 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-11 13:54:57 +0000 |
commit | f730c1820fbab8c29b51738f8dd19cb88c7d5136 (patch) | |
tree | 4b23e460a768fd4aba370dab590463ceb13bdc86 /src/gpu/GrDirectContext.cpp | |
parent | d17444d5f3adef081ba55892f2f433eb6b6dccd6 (diff) |
Reland "Reland "Make GrVkBackendContext no longer derive from SkRefCnt.""
This reverts commit 007267bdb54d56ec978c97c6a6944afc2b6ff40b.
Reason for revert: Hopefully fuchsia is fixed this time
Original change's description:
> Revert "Reland "Make GrVkBackendContext no longer derive from SkRefCnt.""
>
> This reverts commit 0db3a8846a4d05d55c36b7fa95fa6fbc1a6639cd.
>
> Reason for revert: fuchsia change reverted
>
> Original change's description:
> > Reland "Make GrVkBackendContext no longer derive from SkRefCnt."
> >
> > This reverts commit 059a9ab4bcd07a4bfdbfef333c27ef3d277e0e46.
> >
> > Reason for revert: Fix landed in Fuchsia
> >
> > Original change's description:
> > > Revert "Make GrVkBackendContext no longer derive from SkRefCnt."
> > >
> > > This reverts commit 93ae2337732bf206e6ef4faecc6b30c3881e8359.
> > >
> > > Reason for revert: <INSERT REASONING HERE>
> > >
> > > Original change's description:
> > > > Make GrVkBackendContext no longer derive from SkRefCnt.
> > > >
> > > > Also moves the helper Create functions to VkTestUtils since no clients
> > > > are using them anymore.
> > > >
> > > > Bug: skia:
> > > > Change-Id: I7e8e4912e7ef6fb00a7e2a00407aed5e83211799
> > > > Reviewed-on: https://skia-review.googlesource.com/135323
> > > > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > >
> > > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> > >
> > > # Not skipping CQ checks because original CL landed > 1 day ago.
> > >
> > > Bug: skia:
> > > Change-Id: If7201917631dc22753ea3fa6e9d2984463e38e4c
> > > Reviewed-on: https://skia-review.googlesource.com/137903
> > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: skia:
> > Change-Id: Ia4b7c0bb2c7b5dba809d85c69f0b41b473140526
> > Reviewed-on: https://skia-review.googlesource.com/138181
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
>
> Change-Id: I3f7bc4a5e4e09512fe165303685c123ec3527e58
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/138422
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:
Change-Id: I5705f1ae306707fe28559797e1bb8c2d57e12204
Reviewed-on: https://skia-review.googlesource.com/139000
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrDirectContext.cpp')
-rw-r--r-- | src/gpu/GrDirectContext.cpp | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/src/gpu/GrDirectContext.cpp b/src/gpu/GrDirectContext.cpp index 83e2194003..3e4b8ef5fa 100644 --- a/src/gpu/GrDirectContext.cpp +++ b/src/gpu/GrDirectContext.cpp @@ -156,43 +156,7 @@ sk_sp<GrContext> GrContext::MakeVulkan(const GrVkBackendContext& backendContext, const GrContextOptions& options) { sk_sp<GrContext> context(new GrDirectContext(kVulkan_GrBackend)); - sk_sp<GrVkBackendContext> backendContextRef(new GrVkBackendContext()); - backendContextRef->fInstance = backendContext.fInstance; - backendContextRef->fPhysicalDevice = backendContext.fPhysicalDevice; - backendContextRef->fDevice = backendContext.fDevice; - backendContextRef->fQueue = backendContext.fQueue; - backendContextRef->fGraphicsQueueIndex = backendContext.fGraphicsQueueIndex; - backendContextRef->fMinAPIVersion = backendContext.fMinAPIVersion; - backendContextRef->fExtensions = backendContext.fExtensions; - backendContextRef->fFeatures = backendContext.fFeatures; - backendContextRef->fInterface = backendContext.fInterface; - backendContextRef->fMemoryAllocator = backendContext.fMemoryAllocator; - - SkASSERT(!backendContext.fOwnsInstanceAndDevice); - backendContextRef->fOwnsInstanceAndDevice = false; - - context->fGpu = GrVkGpu::Make(std::move(backendContextRef), options, context.get()); - if (!context->fGpu) { - return nullptr; - } - - context->fCaps = context->fGpu->refCaps(); - if (!context->init(options)) { - return nullptr; - } - return context; -} - -sk_sp<GrContext> GrContext::MakeVulkan(sk_sp<const GrVkBackendContext> backendContext) { - GrContextOptions defaultOptions; - return MakeVulkan(std::move(backendContext), defaultOptions); -} - -sk_sp<GrContext> GrContext::MakeVulkan(sk_sp<const GrVkBackendContext> backendContext, - const GrContextOptions& options) { - sk_sp<GrContext> context(new GrDirectContext(kVulkan_GrBackend)); - - context->fGpu = GrVkGpu::Make(std::move(backendContext), options, context.get()); + context->fGpu = GrVkGpu::Make(backendContext, options, context.get()); if (!context->fGpu) { return nullptr; } |