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

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

Issue 1424313010: Separate out natively-texture image/bmp draws from cached-as-texture image/bmp draws (Closed) Base URL: https://skia.googlesource.com/skia.git@const
Patch Set: update 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/gpu/GrDrawContext.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
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrImageIDTextureAdjuster_DEFINED
9 #define GrImageIDTextureAdjuster_DEFINED
10
11 #include "GrTextureParamsAdjuster.h"
12
13 class SkBitmap;
14 class SkImage_Base;
15
16 /** Implementation for texture-backed SkBitmaps. The bitmap must stay in scope a nd unmodified
17 while this object exists. */
18 class GrBitmapTextureAdjuster : public GrTextureAdjuster {
19 public:
20 explicit GrBitmapTextureAdjuster(const SkBitmap* bmp);
21
22 private:
23 void makeCopyKey(const CopyParams& params, GrUniqueKey* copyKey) override;
24
25 void didCacheCopy(const GrUniqueKey& copyKey) override;
26
27 const SkBitmap* fBmp;
28
29 typedef GrTextureAdjuster INHERITED;
30 };
31
32 /** Implementation for texture-backed SkImages. The image must stay in scope and unmodified while
33 this object exists. */
34 class GrImageTextureAdjuster : public GrTextureAdjuster {
35 public:
36 explicit GrImageTextureAdjuster(const SkImage_Base* img);
37
38 private:
39 void makeCopyKey(const CopyParams& params, GrUniqueKey* copyKey) override;
40
41 void didCacheCopy(const GrUniqueKey& copyKey) override;
42
43 const SkImage_Base* fImageBase;
44
45 typedef GrTextureAdjuster INHERITED;
46 };
47
48 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrImageIDTextureAdjuster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698