Small cleanups suggested by ClangTidy
Bug: skia: Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD Change-Id: Idd95e359838fdaecbdccc3a2c5a1b36971f20b8b Reviewed-on: https://skia-review.googlesource.com/113703 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
parent
689d02d4b4
commit
b5502b2012
@ -173,7 +173,7 @@ sk_sp<SkImage> SkDeferredDisplayListRecorder::makePromiseTexture(
|
||||
origin,
|
||||
colorType,
|
||||
alphaType,
|
||||
colorSpace,
|
||||
std::move(colorSpace),
|
||||
textureFulfillProc,
|
||||
textureReleaseProc,
|
||||
textureContext);
|
||||
|
@ -28,7 +28,7 @@ public:
|
||||
/**
|
||||
* Create a GrContext without a resource cache
|
||||
*/
|
||||
static sk_sp<GrContext> MakeDDL(sk_sp<GrContextThreadSafeProxy>);
|
||||
static sk_sp<GrContext> MakeDDL(const sk_sp<GrContextThreadSafeProxy>&);
|
||||
|
||||
GrDrawingManager* drawingManager() { return fContext->fDrawingManager.get(); }
|
||||
|
||||
|
@ -61,7 +61,7 @@ private:
|
||||
typedef GrContext INHERITED;
|
||||
};
|
||||
|
||||
sk_sp<GrContext> GrContextPriv::MakeDDL(sk_sp<GrContextThreadSafeProxy> proxy) {
|
||||
sk_sp<GrContext> GrContextPriv::MakeDDL(const sk_sp<GrContextThreadSafeProxy>& proxy) {
|
||||
sk_sp<GrContext> context(new GrDDLContext(proxy));
|
||||
|
||||
// Note: we aren't creating a Gpu here. This causes the resource provider & cache to
|
||||
|
@ -140,7 +140,7 @@ public:
|
||||
/*
|
||||
* Create a render target proxy that wraps a backend texture
|
||||
*/
|
||||
sk_sp<GrSurfaceProxy> wrapBackendTextureAsRenderTarget(const GrBackendTexture& tex,
|
||||
sk_sp<GrSurfaceProxy> wrapBackendTextureAsRenderTarget(const GrBackendTexture& backendTex,
|
||||
GrSurfaceOrigin origin,
|
||||
int sampleCnt);
|
||||
|
||||
|
@ -123,7 +123,7 @@ public:
|
||||
return data.fKey;
|
||||
}
|
||||
|
||||
static inline uint32_t Hash(ShapeDataKey key) {
|
||||
static inline uint32_t Hash(const ShapeDataKey& key) {
|
||||
return SkOpts::hash(key.data(), sizeof(uint32_t) * key.count32());
|
||||
}
|
||||
};
|
||||
|
@ -2828,21 +2828,21 @@ SI void store(T* ptr, size_t tail, V v) {
|
||||
}
|
||||
|
||||
template<>
|
||||
F gather(const float* p, U32 ix) {
|
||||
F gather(const float* ptr, U32 ix) {
|
||||
__m256i lo, hi;
|
||||
split(ix, &lo, &hi);
|
||||
|
||||
return join<F>(_mm256_i32gather_ps(p, lo, 4),
|
||||
_mm256_i32gather_ps(p, hi, 4));
|
||||
return join<F>(_mm256_i32gather_ps(ptr, lo, 4),
|
||||
_mm256_i32gather_ps(ptr, hi, 4));
|
||||
}
|
||||
|
||||
template<>
|
||||
U32 gather(const uint32_t* p, U32 ix) {
|
||||
U32 gather(const uint32_t* ptr, U32 ix) {
|
||||
__m256i lo, hi;
|
||||
split(ix, &lo, &hi);
|
||||
|
||||
return join<U32>(_mm256_i32gather_epi32(p, lo, 4),
|
||||
_mm256_i32gather_epi32(p, hi, 4));
|
||||
return join<U32>(_mm256_i32gather_epi32(ptr, lo, 4),
|
||||
_mm256_i32gather_epi32(ptr, hi, 4));
|
||||
}
|
||||
#else
|
||||
template <typename V, typename T>
|
||||
|
@ -28,10 +28,10 @@ int GrDrawOpAtlas::numAllocated_TestingOnly() const {
|
||||
return count;
|
||||
}
|
||||
|
||||
void GrAtlasManager::setMaxPages_TestingOnly(uint32_t numPages) {
|
||||
void GrAtlasManager::setMaxPages_TestingOnly(uint32_t maxPages) {
|
||||
for (int i = 0; i < kMaskFormatCount; i++) {
|
||||
if (fAtlases[i]) {
|
||||
fAtlases[i]->setMaxPages_TestingOnly(numPages);
|
||||
fAtlases[i]->setMaxPages_TestingOnly(maxPages);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user