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

Side by Side Diff: src/gpu/vk/GrVkGpuCommandBuffer.h

Issue 2078483002: Start using GrGpuCommandBuffer in GrDrawTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@memoryWAR
Patch Set: remove errant lines Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/gpu/vk/GrVkGpu.cpp ('k') | src/gpu/vk/GrVkGpuCommandBuffer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrVkGpuCommandBuffer_DEFINED 8 #ifndef GrVkGpuCommandBuffer_DEFINED
9 #define GrVkGpuCommandBuffer_DEFINED 9 #define GrVkGpuCommandBuffer_DEFINED
10 10
11 #include "GrGpuCommandBuffer.h" 11 #include "GrGpuCommandBuffer.h"
12 12
13 #include "GrColor.h" 13 #include "GrColor.h"
14 #include "GrTypes.h"
15 #include "GrVkPipelineState.h"
14 16
17 class GrNonInstancedMesh;
15 class GrVkGpu; 18 class GrVkGpu;
19 class GrVkImage;
16 class GrVkRenderPass; 20 class GrVkRenderPass;
17 class GrVkRenderTarget; 21 class GrVkRenderTarget;
18 class GrVkSecondaryCommandBuffer; 22 class GrVkSecondaryCommandBuffer;
19 23
20 class GrVkGpuCommandBuffer : public GrGpuCommandBuffer { 24 class GrVkGpuCommandBuffer : public GrGpuCommandBuffer {
21 public: 25 public:
22 GrVkGpuCommandBuffer(GrVkGpu* gpu, 26 GrVkGpuCommandBuffer(GrVkGpu* gpu,
23 const GrVkRenderTarget&, 27 GrVkRenderTarget*,
24 LoadAndStoreOp colorOp, GrColor colorClear, 28 const LoadAndStoreInfo& colorInfo,
25 LoadAndStoreOp stencilOp, GrColor stencilClear); 29 const LoadAndStoreInfo& stencilInfo);
26 30
27 virtual ~GrVkGpuCommandBuffer(); 31 virtual ~GrVkGpuCommandBuffer();
28 32
29 void end() override; 33 void end() override;
30 34
31 void submit() override; 35 void discard(GrRenderTarget* rt) override {}
32 36
33 private: 37 private:
38 GrGpu* gpu() override;
39
40 void onSubmit(const SkIRect& bounds) override;
41
42 // Bind vertex and index buffers
43 void bindGeometry(const GrPrimitiveProcessor&, const GrNonInstancedMesh&);
44
45 sk_sp<GrVkPipelineState> prepareDrawState(const GrPipeline&,
46 const GrPrimitiveProcessor&,
47 GrPrimitiveType,
48 const GrVkRenderPass&);
49
50 void onDraw(const GrPipeline& pipeline,
51 const GrPrimitiveProcessor& primProc,
52 const GrMesh* mesh,
53 int meshCount) override;
54
55 void onClear(GrRenderTarget* rt, const SkIRect& rect, GrColor color) overrid e;
56
57 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli p) override;
58
34 const GrVkRenderPass* fRenderPass; 59 const GrVkRenderPass* fRenderPass;
35 GrVkSecondaryCommandBuffer* fCommandBuffer; 60 GrVkSecondaryCommandBuffer* fCommandBuffer;
36 GrVkGpu* fGpu; 61 GrVkGpu* fGpu;
62 GrVkRenderTarget* fRenderTarget;
63 VkClearValue fColorClearValue;
64
65 SkTArray<GrVkImage*> fSampledImages;
66
67 bool fIsEmpty;
37 68
38 typedef GrGpuCommandBuffer INHERITED; 69 typedef GrGpuCommandBuffer INHERITED;
39 }; 70 };
40 71
41 #endif 72 #endif
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkGpu.cpp ('k') | src/gpu/vk/GrVkGpuCommandBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698