Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Unified Diff: src/gpu/vk/GrVkRenderTarget.h

Issue 1723503002: Revert of Add vulkan files into skia repo. (Closed) Base URL: https://skia.googlesource.com/skia.git@merge
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/vk/GrVkRenderPass.cpp ('k') | src/gpu/vk/GrVkRenderTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/vk/GrVkRenderTarget.h
diff --git a/src/gpu/vk/GrVkRenderTarget.h b/src/gpu/vk/GrVkRenderTarget.h
deleted file mode 100644
index b4d72eac73cf36c4dd9b8d488510a05dc74e26de..0000000000000000000000000000000000000000
--- a/src/gpu/vk/GrVkRenderTarget.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright 2015 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-
-#ifndef GrVkRenderTarget_DEFINED
-#define GrVkRenderTarget_DEFINED
-
-#include "GrVkImage.h"
-#include "GrRenderTarget.h"
-
-#include "GrVkRenderPass.h"
-
-class GrVkCommandBuffer;
-class GrVkFramebuffer;
-class GrVkGpu;
-class GrVkImageView;
-class GrVkStencilAttachment;
-
-#ifdef SK_BUILD_FOR_WIN
-// Windows gives bogus warnings about inheriting asTexture/asRenderTarget via dominance.
-#pragma warning(push)
-#pragma warning(disable: 4250)
-#endif
-
-class GrVkRenderTarget: public GrRenderTarget, public virtual GrVkImage {
-public:
- static GrVkRenderTarget* CreateNewRenderTarget(GrVkGpu*, const GrSurfaceDesc&,
- GrGpuResource::LifeCycle,
- const GrVkImage::ImageDesc&);
-
- static GrVkRenderTarget* CreateWrappedRenderTarget(GrVkGpu*, const GrSurfaceDesc&,
- GrGpuResource::LifeCycle,
- const GrVkImage::Resource* resource);
-
- ~GrVkRenderTarget() override;
-
- const GrVkFramebuffer* framebuffer() const { return fFramebuffer; }
- const GrVkImageView* colorAttachmentView() const { return fColorAttachmentView; }
- const GrVkImage::Resource* msaaImageResource() const { return fMSAAImageResource; }
- const GrVkImageView* resolveAttachmentView() const { return fResolveAttachmentView; }
- const GrVkImage::Resource* stencilImageResource() const;
- const GrVkImageView* stencilAttachmentView() const;
-
- const GrVkRenderPass* simpleRenderPass() const { return fCachedSimpleRenderPass; }
-
- // override of GrRenderTarget
- ResolveType getResolveType() const override {
- return kCanResolve_ResolveType;
- }
-
- bool canAttemptStencilAttachment() const override {
- return true;
- }
-
- GrBackendObject getRenderTargetHandle() const override;
-
- // Returns the total number of attachments
- void getAttachmentsDescriptor(GrVkRenderPass::AttachmentsDescriptor* desc,
- GrVkRenderPass::AttachmentFlags* flags) const;
-
- void addResources(GrVkCommandBuffer& commandBuffer) const;
-
-protected:
- enum Derived { kDerived };
-
- GrVkRenderTarget(GrVkGpu* gpu,
- const GrSurfaceDesc& desc,
- GrGpuResource::LifeCycle,
- const GrVkImage::Resource* imageResource,
- const GrVkImage::Resource* msaaImageResource,
- const GrVkImageView* colorAttachmentView,
- const GrVkImageView* resolveAttachmentView);
-
- GrVkRenderTarget(GrVkGpu* gpu,
- const GrSurfaceDesc& desc,
- GrGpuResource::LifeCycle,
- const GrVkImage::Resource* imageResource,
- const GrVkImage::Resource* msaaImageResource,
- const GrVkImageView* colorAttachmentView,
- const GrVkImageView* resolveAttachmentView,
- Derived);
-
- GrVkRenderTarget(GrVkGpu* gpu,
- const GrSurfaceDesc& desc,
- GrGpuResource::LifeCycle,
- const GrVkImage::Resource* imageResource,
- const GrVkImageView* colorAttachmentView);
-
- GrVkRenderTarget(GrVkGpu* gpu,
- const GrSurfaceDesc& desc,
- GrGpuResource::LifeCycle,
- const GrVkImage::Resource* imageResource,
- const GrVkImageView* colorAttachmentView,
- Derived);
-
- static GrVkRenderTarget* Create(GrVkGpu*, const GrSurfaceDesc&,
- GrGpuResource::LifeCycle,
- const GrVkImage::Resource* imageResource);
-
- GrVkGpu* getVkGpu() const;
-
- void onAbandon() override;
- void onRelease() override;
-
- // This accounts for the texture's memory and any MSAA renderbuffer's memory.
- size_t onGpuMemorySize() const override {
- SkASSERT(kUnknown_GrPixelConfig != fDesc.fConfig);
- SkASSERT(!GrPixelConfigIsCompressed(fDesc.fConfig));
- size_t colorBytes = GrBytesPerPixel(fDesc.fConfig);
- SkASSERT(colorBytes > 0);
- return fColorValuesPerPixel * fDesc.fWidth * fDesc.fHeight * colorBytes;
- }
-
-private:
- bool completeStencilAttachment() override;
-
- void createFramebuffer(GrVkGpu* gpu);
-
- void releaseInternalObjects();
- void abandonInternalObjects();
-
- const GrVkFramebuffer* fFramebuffer;
- const GrVkImageView* fColorAttachmentView;
- const GrVkImage::Resource* fMSAAImageResource;
- const GrVkImageView* fResolveAttachmentView;
- int fColorValuesPerPixel;
-
- // This is a cached pointer to a simple render pass. The render target should unref it
- // once it is done with it.
- const GrVkRenderPass* fCachedSimpleRenderPass;
-};
-
-#endif
« no previous file with comments | « src/gpu/vk/GrVkRenderPass.cpp ('k') | src/gpu/vk/GrVkRenderTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698