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

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

Issue 2241353002: pin as texture api (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix comments Created 4 years, 4 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/core/SkImagePriv.h ('k') | src/gpu/GrImageIDTextureAdjuster.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 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 class GrImageTextureAdjuster : public GrTextureAdjuster {
19 public:
20 explicit GrImageTextureAdjuster(const SkImage_Base* img);
21 };
22
23 /** This class manages the conversion of SW-backed bitmaps to GrTextures. If the input bitmap is 18 /** This class manages the conversion of SW-backed bitmaps to GrTextures. If the input bitmap is
24 non-volatile the texture is cached using a key created from the pixels' imag e id and the 19 non-volatile the texture is cached using a key created from the pixels' imag e id and the
25 subset of the pixelref specified by the bitmap. */ 20 subset of the pixelref specified by the bitmap. */
26 class GrBitmapTextureMaker : public GrTextureMaker { 21 class GrBitmapTextureMaker : public GrTextureMaker {
27 public: 22 public:
28 GrBitmapTextureMaker(GrContext* context, const SkBitmap& bitmap); 23 GrBitmapTextureMaker(GrContext* context, const SkBitmap& bitmap);
29 24
30 protected: 25 protected:
31 GrTexture* refOriginalTexture(bool willBeMipped, SkSourceGammaTreatment) ove rride; 26 GrTexture* refOriginalTexture(bool willBeMipped, SkSourceGammaTreatment) ove rride;
32 27
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 private: 59 private:
65 SkImageCacherator* fCacher; 60 SkImageCacherator* fCacher;
66 const SkImage* fClient; 61 const SkImage* fClient;
67 GrUniqueKey fOriginalKey; 62 GrUniqueKey fOriginalKey;
68 SkImage::CachingHint fCachingHint; 63 SkImage::CachingHint fCachingHint;
69 64
70 typedef GrTextureMaker INHERITED; 65 typedef GrTextureMaker INHERITED;
71 }; 66 };
72 67
73 #endif 68 #endif
OLDNEW
« no previous file with comments | « src/core/SkImagePriv.h ('k') | src/gpu/GrImageIDTextureAdjuster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698