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

Side by Side Diff: src/core/SkBitmapProcShader.h

Issue 1772463002: use Make instead of Create to return a shared shader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: partial update of skia call-sites 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
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 SkBitmapProcShader_DEFINED 8 #ifndef SkBitmapProcShader_DEFINED
9 #define SkBitmapProcShader_DEFINED 9 #define SkBitmapProcShader_DEFINED
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // Commonly used allocator. It currently is only used to allocate up to 3 object s. The total 53 // Commonly used allocator. It currently is only used to allocate up to 3 object s. The total
54 // bytes requested is calculated using one of our large shaders, its context siz e plus the size of 54 // bytes requested is calculated using one of our large shaders, its context siz e plus the size of
55 // an Sk3DBlitter in SkDraw.cpp 55 // an Sk3DBlitter in SkDraw.cpp
56 // Note that some contexts may contain other contexts (e.g. for compose shaders) , but we've not 56 // Note that some contexts may contain other contexts (e.g. for compose shaders) , but we've not
57 // yet found a situation where the size below isn't big enough. 57 // yet found a situation where the size below isn't big enough.
58 typedef SkSmallAllocator<3, 2100> SkTBlitterAllocator; 58 typedef SkSmallAllocator<3, 2100> SkTBlitterAllocator;
59 59
60 // If alloc is non-nullptr, it will be used to allocate the returned SkShader, a nd MUST outlive 60 // If alloc is non-nullptr, it will be used to allocate the returned SkShader, a nd MUST outlive
61 // the SkShader. 61 // the SkShader.
62 SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader ::TileMode, 62 sk_sp<SkShader> SkMakeBitmapShader(const SkBitmap& src, SkShader::TileMode, SkSh ader::TileMode,
63 const SkMatrix* localMatrix, SkTBlitterAllocator* alloc); 63 const SkMatrix* localMatrix, SkTBlitterAlloca tor* alloc);
64 64
65 #endif 65 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698