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

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

Issue 1834663002: Remove debug prints in GrVkGpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | no next file » | 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 2015 Google Inc. 2 * Copyright 2015 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 GrVkGpu_DEFINED 8 #ifndef GrVkGpu_DEFINED
9 #define GrVkGpu_DEFINED 9 #define GrVkGpu_DEFINED
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 }; 60 };
61 61
62 bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeigh t, size_t rowBytes, 62 bool onGetReadPixelsInfo(GrSurface* srcSurface, int readWidth, int readHeigh t, size_t rowBytes,
63 GrPixelConfig readConfig, DrawPreference*, 63 GrPixelConfig readConfig, DrawPreference*,
64 ReadPixelTempDrawInfo*) override; 64 ReadPixelTempDrawInfo*) override;
65 65
66 bool onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height, 66 bool onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height,
67 GrPixelConfig srcConfig, DrawPreference*, 67 GrPixelConfig srcConfig, DrawPreference*,
68 WritePixelTempDrawInfo*) override; 68 WritePixelTempDrawInfo*) override;
69 69
70 void discard(GrRenderTarget*) override { 70 void discard(GrRenderTarget*) override {}
71 SkDebugf("discard not yet implemented for Vulkan\n");
72 }
73 71
74 bool onCopySurface(GrSurface* dst, 72 bool onCopySurface(GrSurface* dst,
75 GrSurface* src, 73 GrSurface* src,
76 const SkIRect& srcRect, 74 const SkIRect& srcRect,
77 const SkIPoint& dstPoint) override; 75 const SkIPoint& dstPoint) override;
78 76
79 void onGetMultisampleSpecs(GrRenderTarget* rt, 77 void onGetMultisampleSpecs(GrRenderTarget* rt,
80 const GrStencilSettings&, 78 const GrStencilSettings&,
81 int* effectiveSampleCnt, 79 int* effectiveSampleCnt,
82 SkAutoTDeleteArray<SkPoint>*); 80 SkAutoTDeleteArray<SkPoint>*);
83 81
84 bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const override { 82 bool initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const override {
85 SkDebugf("initCopySurfaceDstDesc not yet implemented for Vulkan\n");
86 return false; 83 return false;
87 } 84 }
88 85
89 void xferBarrier(GrRenderTarget*, GrXferBarrierType) override {} 86 void xferBarrier(GrRenderTarget*, GrXferBarrierType) override {}
90 87
91 GrBackendObject createTestingOnlyBackendTexture(void* pixels, int w, int h, 88 GrBackendObject createTestingOnlyBackendTexture(void* pixels, int w, int h,
92 GrPixelConfig config) overri de; 89 GrPixelConfig config) overri de;
93 bool isTestingOnlyBackendTexture(GrBackendObject id) const override; 90 bool isTestingOnlyBackendTexture(GrBackendObject id) const override;
94 void deleteTestingOnlyBackendTexture(GrBackendObject id, bool abandonTexture ) override; 91 void deleteTestingOnlyBackendTexture(GrBackendObject id, bool abandonTexture ) override;
95 92
96 GrStencilAttachment* createStencilAttachmentForRenderTarget(const GrRenderTa rget*, 93 GrStencilAttachment* createStencilAttachmentForRenderTarget(const GrRenderTa rget*,
97 int width, 94 int width,
98 int height) over ride; 95 int height) over ride;
99 96
100 void clearStencil(GrRenderTarget* target) override; 97 void clearStencil(GrRenderTarget* target) override;
101 98
102 void drawDebugWireRect(GrRenderTarget*, const SkIRect&, GrColor) override { 99 void drawDebugWireRect(GrRenderTarget*, const SkIRect&, GrColor) override {}
103 SkDebugf("drawDebugWireRect not yet implemented for Vulkan\n");
104 }
105 100
106 void addMemoryBarrier(VkPipelineStageFlags srcStageMask, 101 void addMemoryBarrier(VkPipelineStageFlags srcStageMask,
107 VkPipelineStageFlags dstStageMask, 102 VkPipelineStageFlags dstStageMask,
108 bool byRegion, 103 bool byRegion,
109 VkMemoryBarrier* barrier) const; 104 VkMemoryBarrier* barrier) const;
110 void addBufferMemoryBarrier(VkPipelineStageFlags srcStageMask, 105 void addBufferMemoryBarrier(VkPipelineStageFlags srcStageMask,
111 VkPipelineStageFlags dstStageMask, 106 VkPipelineStageFlags dstStageMask,
112 bool byRegion, 107 bool byRegion,
113 VkBufferMemoryBarrier* barrier) const; 108 VkBufferMemoryBarrier* barrier) const;
114 void addImageMemoryBarrier(VkPipelineStageFlags srcStageMask, 109 void addImageMemoryBarrier(VkPipelineStageFlags srcStageMask,
(...skipping 10 matching lines...) Expand all
125 private: 120 private:
126 GrVkGpu(GrContext* context, const GrContextOptions& options, 121 GrVkGpu(GrContext* context, const GrContextOptions& options,
127 const GrVkBackendContext* backendContext); 122 const GrVkBackendContext* backendContext);
128 123
129 void onResetContext(uint32_t resetBits) override {} 124 void onResetContext(uint32_t resetBits) override {}
130 125
131 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, GrGpuResource::LifeCyc le, 126 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, GrGpuResource::LifeCyc le,
132 const SkTArray<GrMipLevel>&) override; 127 const SkTArray<GrMipLevel>&) override;
133 128
134 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, GrGpuResourc e::LifeCycle, 129 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, GrGpuResourc e::LifeCycle,
135 const SkTArray<GrMipLevel>&) override { 130 const SkTArray<GrMipLevel>&) override { return NULL; }
136 SkDebugf("onCreateCompressedTexture not yet implemented for Vulkan\n");
137 return NULL;
138 }
139 131
140 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership ) override; 132 GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership ) override;
141 133
142 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&, 134 GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&,
143 GrWrapOwnership) override; 135 GrWrapOwnership) override;
144 GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTextureDes c&, 136 GrRenderTarget* onWrapBackendTextureAsRenderTarget(const GrBackendTextureDes c&,
145 GrWrapOwnership) override { 137 GrWrapOwnership) override { return NULL; }
146 SkDebugf("onWrapBackendTextureAsRenderTarget not yet implemented for Vul kan\n");
147 return NULL;
148 }
149 138
150 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override; 139 GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) override;
151 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override; 140 GrIndexBuffer* onCreateIndexBuffer(size_t size, bool dynamic) override;
152 GrTransferBuffer* onCreateTransferBuffer(size_t size, TransferType type) ove rride; 141 GrTransferBuffer* onCreateTransferBuffer(size_t size, TransferType type) ove rride;
153 142
154 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override; 143 void onClear(GrRenderTarget*, const SkIRect& rect, GrColor color) override;
155 144
156 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli p) override; 145 void onClearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideCli p) override;
157 146
158 void onDraw(const GrPipeline&, 147 void onDraw(const GrPipeline&,
159 const GrPrimitiveProcessor&, 148 const GrPrimitiveProcessor&,
160 const GrMesh*, 149 const GrMesh*,
161 int meshCount) override; 150 int meshCount) override;
162 151
163 bool onReadPixels(GrSurface* surface, 152 bool onReadPixels(GrSurface* surface,
164 int left, int top, int width, int height, 153 int left, int top, int width, int height,
165 GrPixelConfig, 154 GrPixelConfig,
166 void* buffer, 155 void* buffer,
167 size_t rowBytes) override; 156 size_t rowBytes) override;
168 157
169 bool onWritePixels(GrSurface* surface, 158 bool onWritePixels(GrSurface* surface,
170 int left, int top, int width, int height, 159 int left, int top, int width, int height,
171 GrPixelConfig config, const SkTArray<GrMipLevel>&) overri de; 160 GrPixelConfig config, const SkTArray<GrMipLevel>&) overri de;
172 161
173 bool onTransferPixels(GrSurface*, 162 bool onTransferPixels(GrSurface*,
174 int left, int top, int width, int height, 163 int left, int top, int width, int height,
175 GrPixelConfig config, GrTransferBuffer* buffer, 164 GrPixelConfig config, GrTransferBuffer* buffer,
176 size_t offset, size_t rowBytes) override { 165 size_t offset, size_t rowBytes) override { return fals e; }
177 SkDebugf("onTransferPixels not yet implemented for Vulkan\n");
178 return false;
179 }
180 166
181 void onResolveRenderTarget(GrRenderTarget* target) override { 167 void onResolveRenderTarget(GrRenderTarget* target) override {}
182 SkDebugf("onResolveRenderTarget not yet implemented for Vulkan\n");
183 }
184 168
185 bool prepareDrawState(const GrPipeline&, 169 bool prepareDrawState(const GrPipeline&,
186 const GrPrimitiveProcessor&, 170 const GrPrimitiveProcessor&,
187 GrPrimitiveType, 171 GrPrimitiveType,
188 const GrVkRenderPass&, 172 const GrVkRenderPass&,
189 GrVkPipelineState** pipelineState); 173 GrVkPipelineState** pipelineState);
190 174
191 // Bind vertex and index buffers 175 // Bind vertex and index buffers
192 void bindGeometry(const GrPrimitiveProcessor&, const GrNonInstancedMesh&); 176 void bindGeometry(const GrPrimitiveProcessor&, const GrNonInstancedMesh&);
193 177
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 219
236 // Shaderc compiler used for compiling glsl in spirv. We only want to create the compiler once 220 // Shaderc compiler used for compiling glsl in spirv. We only want to create the compiler once
237 // since there is significant overhead to the first compile of any compiler. 221 // since there is significant overhead to the first compile of any compiler.
238 shaderc_compiler_t fCompiler; 222 shaderc_compiler_t fCompiler;
239 223
240 224
241 typedef GrGpu INHERITED; 225 typedef GrGpu INHERITED;
242 }; 226 };
243 227
244 #endif 228 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698