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

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

Issue 2029373004: respect srgb gamma when building mips (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix warning Created 4 years, 6 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 | « include/private/SkTemplates.h ('k') | src/core/SkBitmapCache.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 2014 Google Inc. 2 * Copyright 2014 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 SkBitmapCache_DEFINED 8 #ifndef SkBitmapCache_DEFINED
9 #define SkBitmapCache_DEFINED 9 #define SkBitmapCache_DEFINED
10 10
11 #include "SkScalar.h"
12 #include "SkBitmap.h" 11 #include "SkBitmap.h"
12 #include "SkMipMap.h"
13 13
14 class SkImage; 14 class SkImage;
15 class SkResourceCache; 15 class SkResourceCache;
16 class SkMipMap;
17 16
18 uint64_t SkMakeResourceCacheSharedIDForBitmap(uint32_t bitmapGenID); 17 uint64_t SkMakeResourceCacheSharedIDForBitmap(uint32_t bitmapGenID);
19 18
20 void SkNotifyBitmapGenIDIsStale(uint32_t bitmapGenID); 19 void SkNotifyBitmapGenIDIsStale(uint32_t bitmapGenID);
21 20
22 struct SkBitmapCacheDesc { 21 struct SkBitmapCacheDesc {
23 uint32_t fImageID; 22 uint32_t fImageID;
24 int32_t fWidth; 23 int32_t fWidth;
25 int32_t fHeight; 24 int32_t fHeight;
26 SkIRect fBounds; 25 SkIRect fBounds;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 static bool Add(SkPixelRef*, const SkIRect& subset, const SkBitmap& result, 65 static bool Add(SkPixelRef*, const SkIRect& subset, const SkBitmap& result,
67 SkResourceCache* localCache = nullptr); 66 SkResourceCache* localCache = nullptr);
68 67
69 static bool Find(uint32_t genID, SkBitmap* result, SkResourceCache* localCac he = nullptr); 68 static bool Find(uint32_t genID, SkBitmap* result, SkResourceCache* localCac he = nullptr);
70 // todo: eliminate the need to specify ID, since it should == the bitmap's 69 // todo: eliminate the need to specify ID, since it should == the bitmap's
71 static void Add(uint32_t genID, const SkBitmap&, SkResourceCache* localCache = nullptr); 70 static void Add(uint32_t genID, const SkBitmap&, SkResourceCache* localCache = nullptr);
72 }; 71 };
73 72
74 class SkMipMapCache { 73 class SkMipMapCache {
75 public: 74 public:
76 static const SkMipMap* FindAndRef(const SkBitmapCacheDesc&, 75 static const SkMipMap* FindAndRef(const SkBitmapCacheDesc&, SkSourceGammaTre atment,
77 SkResourceCache* localCache = nullptr); 76 SkResourceCache* localCache = nullptr);
78 static const SkMipMap* AddAndRef(const SkBitmap& src, SkResourceCache* local Cache = nullptr); 77 static const SkMipMap* AddAndRef(const SkBitmap& src, SkSourceGammaTreatment ,
78 SkResourceCache* localCache = nullptr);
79 }; 79 };
80 80
81 #endif 81 #endif
OLDNEW
« no previous file with comments | « include/private/SkTemplates.h ('k') | src/core/SkBitmapCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698