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

Side by Side Diff: include/core/SkColorSpaceXform.h

Issue 2413383002: Cache dst LUTs in SkColorSpaceXform (Closed)
Patch Set: Ref the storage on SkColorSpaceXform Created 4 years, 2 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 | « bench/ColorCodecBench.cpp ('k') | src/core/SkColorSpace.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 SkColorSpaceXform_DEFINED 8 #ifndef SkColorSpaceXform_DEFINED
9 #define SkColorSpaceXform_DEFINED 9 #define SkColorSpaceXform_DEFINED
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 * @param dstColorFormat Describes color format of |dst| 43 * @param dstColorFormat Describes color format of |dst|
44 * @param srcColorFormat Describes color format of |src| 44 * @param srcColorFormat Describes color format of |src|
45 * Must be kRGBA_8888 or kBGRA_8888 45 * Must be kRGBA_8888 or kBGRA_8888
46 * @param alphaType Describes alpha properties of the |dst| (and |src| ) 46 * @param alphaType Describes alpha properties of the |dst| (and |src| )
47 * kUnpremul preserves input alpha values 47 * kUnpremul preserves input alpha values
48 * kPremul performs a premultiplication and also pr eserves alpha values 48 * kPremul performs a premultiplication and also pr eserves alpha values
49 * kOpaque optimization hint, |dst| alphas set to 1 49 * kOpaque optimization hint, |dst| alphas set to 1
50 * 50 *
51 */ 51 */
52 bool apply(ColorFormat dstFormat, void* dst, ColorFormat srcFormat, const vo id* src, int count, 52 bool apply(ColorFormat dstFormat, void* dst, ColorFormat srcFormat, const vo id* src, int count,
53 SkAlphaType alphaType) const { 53 SkAlphaType alphaType) const;
54 return this->onApply(dstFormat, dst, srcFormat, src, count, alphaType);
55 }
56
57 54
58 virtual ~SkColorSpaceXform() {} 55 virtual ~SkColorSpaceXform() {}
59 56
60 protected: 57 protected:
61 virtual bool onApply(ColorFormat dstFormat, void* dst, ColorFormat srcFormat , const void* src,
62 int count, SkAlphaType alphaType) const = 0;
63
64 SkColorSpaceXform() {} 58 SkColorSpaceXform() {}
65 }; 59 };
66 60
67 #endif 61 #endif
OLDNEW
« no previous file with comments | « bench/ColorCodecBench.cpp ('k') | src/core/SkColorSpace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698