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

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

Issue 1459433002: Convert SkGpuDevice::drawTextureAdjuster to SkGpuDevice::drawTextureProducer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove redudant virtual decl Created 5 years, 1 month 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/SkImageCacherator.cpp ('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
(...skipping 27 matching lines...) Expand all
38 private: 38 private:
39 void makeCopyKey(const CopyParams& params, GrUniqueKey* copyKey) override; 39 void makeCopyKey(const CopyParams& params, GrUniqueKey* copyKey) override;
40 40
41 void didCacheCopy(const GrUniqueKey& copyKey) override; 41 void didCacheCopy(const GrUniqueKey& copyKey) override;
42 42
43 const SkImage_Base* fImageBase; 43 const SkImage_Base* fImageBase;
44 44
45 typedef GrTextureAdjuster INHERITED; 45 typedef GrTextureAdjuster INHERITED;
46 }; 46 };
47 47
48 /** This class manages the conversion of SW-backed bitmaps to GrTextures. If the input bitmap is
49 non-volatile the texture is cached using a key created from the pixels' imag e id and the
50 subset of the pixelref specified by the bitmap. */
51 class GrBitmapTextureMaker : public GrTextureMaker {
52 public:
53 GrBitmapTextureMaker(GrContext* context, const SkBitmap& bitmap);
54
55 protected:
56 GrTexture* refOriginalTexture() override;
57
58 void makeCopyKey(const CopyParams& copyParams, GrUniqueKey* copyKey) overrid e;
59
60 void didCacheCopy(const GrUniqueKey& copyKey) override;
61
62 private:
63 const SkBitmap fBitmap;
64 GrUniqueKey fOriginalKey;
65
66 typedef GrTextureMaker INHERITED;
67 };
68
48 #endif 69 #endif
OLDNEW
« no previous file with comments | « src/core/SkImageCacherator.cpp ('k') | src/gpu/GrImageIDTextureAdjuster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698