OLD | NEW |
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 VkPipelineStageFlags dstStageMask, | 104 VkPipelineStageFlags dstStageMask, |
105 bool byRegion, | 105 bool byRegion, |
106 VkImageMemoryBarrier* barrier) const; | 106 VkImageMemoryBarrier* barrier) const; |
107 | 107 |
108 shaderc_compiler_t shadercCompiler() const { | 108 shaderc_compiler_t shadercCompiler() const { |
109 return fCompiler; | 109 return fCompiler; |
110 } | 110 } |
111 | 111 |
112 void finishDrawTarget() override; | 112 void finishDrawTarget() override; |
113 | 113 |
| 114 bool generateMipmap(GrVkTexture* tex); |
| 115 |
114 private: | 116 private: |
115 GrVkGpu(GrContext* context, const GrContextOptions& options, | 117 GrVkGpu(GrContext* context, const GrContextOptions& options, |
116 const GrVkBackendContext* backendContext); | 118 const GrVkBackendContext* backendContext); |
117 | 119 |
118 void onResetContext(uint32_t resetBits) override {} | 120 void onResetContext(uint32_t resetBits) override {} |
119 | 121 |
120 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted, | 122 GrTexture* onCreateTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted, |
121 const SkTArray<GrMipLevel>&) override; | 123 const SkTArray<GrMipLevel>&) override; |
122 | 124 |
123 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, SkBudgeted, | 125 GrTexture* onCreateCompressedTexture(const GrSurfaceDesc& desc, SkBudgeted, |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 221 |
220 // Shaderc compiler used for compiling glsl in spirv. We only want to create
the compiler once | 222 // Shaderc compiler used for compiling glsl in spirv. We only want to create
the compiler once |
221 // since there is significant overhead to the first compile of any compiler. | 223 // since there is significant overhead to the first compile of any compiler. |
222 shaderc_compiler_t fCompiler; | 224 shaderc_compiler_t fCompiler; |
223 | 225 |
224 | 226 |
225 typedef GrGpu INHERITED; | 227 typedef GrGpu INHERITED; |
226 }; | 228 }; |
227 | 229 |
228 #endif | 230 #endif |
OLD | NEW |