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

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

Issue 1862133002: Add whitelist parameter to refEncodedData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix comments Created 4 years, 8 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 | « src/codec/SkCodecImageGenerator.cpp ('k') | src/core/SkImageCacherator.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 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 SkImageCacherator_DEFINED 8 #ifndef SkImageCacherator_DEFINED
9 #define SkImageCacherator_DEFINED 9 #define SkImageCacherator_DEFINED
10 10
11 #include "SkImage.h"
11 #include "SkImageGenerator.h" 12 #include "SkImageGenerator.h"
12 #include "SkMutex.h" 13 #include "SkMutex.h"
13 #include "SkTemplates.h" 14 #include "SkTemplates.h"
14 15
15 class GrContext; 16 class GrContext;
16 class GrTextureParams; 17 class GrTextureParams;
17 class GrUniqueKey; 18 class GrUniqueKey;
18 class SkBitmap; 19 class SkBitmap;
19 class SkImage; 20 class SkImage;
20 21
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 SkMutex fMutexForGenerator; 95 SkMutex fMutexForGenerator;
95 SkAutoTDelete<SkImageGenerator> fNotThreadSafeGenerator; 96 SkAutoTDelete<SkImageGenerator> fNotThreadSafeGenerator;
96 97
97 const SkImageInfo fInfo; 98 const SkImageInfo fInfo;
98 const SkIPoint fOrigin; 99 const SkIPoint fOrigin;
99 const uint32_t fUniqueID; 100 const uint32_t fUniqueID;
100 101
101 friend class GrImageTextureMaker; 102 friend class GrImageTextureMaker;
102 }; 103 };
103 104
105 // Exposed so it can be tested, not meant for external usage per-se
106 //
107 class SkGpuFormatWhitelist : public SkImageGenerator::RefEncodedWhitelist {
108 GrContext* fCtx;
109 public:
110 SkGpuFormatWhitelist(GrContext* ctx) : fCtx(ctx) {}
111
112 bool includes(SkEncodedFormat format) override;
113 };
114
104 #endif 115 #endif
OLDNEW
« no previous file with comments | « src/codec/SkCodecImageGenerator.cpp ('k') | src/core/SkImageCacherator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698