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

Side by Side Diff: src/gpu/GrImageIDTextureAdjuster.h

Issue 2175873002: remove/deprecate SkBitmap::getTexture, as it now always returns false (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: kill AutoBitmapTexture Created 4 years, 5 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 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 GrImageIDTextureAdjuster_DEFINED 8 #ifndef GrImageIDTextureAdjuster_DEFINED
9 #define GrImageIDTextureAdjuster_DEFINED 9 #define GrImageIDTextureAdjuster_DEFINED
10 10
11 #include "GrTextureParamsAdjuster.h" 11 #include "GrTextureParamsAdjuster.h"
12 #include "SkImage.h" 12 #include "SkImage.h"
13 13
14 class SkBitmap; 14 class SkBitmap;
15 class SkImage_Base; 15 class SkImage_Base;
16 class SkImageCacherator; 16 class SkImageCacherator;
17 17
18 /** Implementation for texture-backed SkBitmaps. The bitmap must stay in scope a nd unmodified
19 while this object exists. */
20 class GrBitmapTextureAdjuster : public GrTextureAdjuster {
21 public:
22 explicit GrBitmapTextureAdjuster(const SkBitmap* bmp);
23
24 protected:
25 SkColorSpace* getColorSpace() override;
26
27 private:
28 void makeCopyKey(const CopyParams& params, GrUniqueKey* copyKey) override;
29
30 void didCacheCopy(const GrUniqueKey& copyKey) override;
31
32 const SkBitmap* fBmp;
33
34 typedef GrTextureAdjuster INHERITED;
35 };
36
37 /** Implementation for texture-backed SkImages. The image must stay in scope and unmodified while 18 /** Implementation for texture-backed SkImages. The image must stay in scope and unmodified while
38 this object exists. */ 19 this object exists. */
39 class GrImageTextureAdjuster : public GrTextureAdjuster { 20 class GrImageTextureAdjuster : public GrTextureAdjuster {
40 public: 21 public:
41 explicit GrImageTextureAdjuster(const SkImage_Base* img); 22 explicit GrImageTextureAdjuster(const SkImage_Base* img);
42 23
43 protected: 24 protected:
44 SkColorSpace* getColorSpace() override; 25 SkColorSpace* getColorSpace() override;
45 26
46 private: 27 private:
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 private: 78 private:
98 SkImageCacherator* fCacher; 79 SkImageCacherator* fCacher;
99 const SkImage* fClient; 80 const SkImage* fClient;
100 GrUniqueKey fOriginalKey; 81 GrUniqueKey fOriginalKey;
101 SkImage::CachingHint fCachingHint; 82 SkImage::CachingHint fCachingHint;
102 83
103 typedef GrTextureMaker INHERITED; 84 typedef GrTextureMaker INHERITED;
104 }; 85 };
105 86
106 #endif 87 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698