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

Side by Side Diff: include/gpu/SkGrPixelRef.h

Issue 320873003: change pixelref to not inherit from SkFlattenable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 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
« no previous file with comments | « include/core/SkReadBuffer.h ('k') | src/core/SkBitmap.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 2010 Google Inc. 2 * Copyright 2010 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 SkGrPixelRef_DEFINED 8 #ifndef SkGrPixelRef_DEFINED
9 #define SkGrPixelRef_DEFINED 9 #define SkGrPixelRef_DEFINED
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 * Constructs a pixel ref around a GrSurface. If the caller has locked the G rSurface in the 44 * Constructs a pixel ref around a GrSurface. If the caller has locked the G rSurface in the
45 * cache and would like the pixel ref to unlock it in its destructor then tr ansferCacheLock 45 * cache and would like the pixel ref to unlock it in its destructor then tr ansferCacheLock
46 * should be set to true. 46 * should be set to true.
47 */ 47 */
48 SkGrPixelRef(const SkImageInfo&, GrSurface*, bool transferCacheLock = false) ; 48 SkGrPixelRef(const SkImageInfo&, GrSurface*, bool transferCacheLock = false) ;
49 virtual ~SkGrPixelRef(); 49 virtual ~SkGrPixelRef();
50 50
51 // override from SkPixelRef 51 // override from SkPixelRef
52 virtual GrTexture* getTexture() SK_OVERRIDE; 52 virtual GrTexture* getTexture() SK_OVERRIDE;
53 53
54 #ifdef SK_SUPPORT_LEGACY_PIXELREF_UNFLATTENABLE
54 SK_DECLARE_UNFLATTENABLE_OBJECT() 55 SK_DECLARE_UNFLATTENABLE_OBJECT()
56 #endif
55 57
56 protected: 58 protected:
57 // overrides from SkPixelRef 59 // overrides from SkPixelRef
58 virtual bool onReadPixels(SkBitmap* dst, const SkIRect* subset) SK_OVERRIDE; 60 virtual bool onReadPixels(SkBitmap* dst, const SkIRect* subset) SK_OVERRIDE;
59 virtual SkPixelRef* deepCopy(SkColorType, const SkIRect* subset) SK_OVERRIDE ; 61 virtual SkPixelRef* deepCopy(SkColorType, const SkIRect* subset) SK_OVERRIDE ;
60 62
61 private: 63 private:
62 GrSurface* fSurface; 64 GrSurface* fSurface;
63 bool fUnlock; // if true the pixel ref owns a texture cache lock on fSurface 65 bool fUnlock; // if true the pixel ref owns a texture cache lock on fSurface
64 66
65 typedef SkROLockPixelsPixelRef INHERITED; 67 typedef SkROLockPixelsPixelRef INHERITED;
66 }; 68 };
67 69
68 #endif 70 #endif
OLDNEW
« no previous file with comments | « include/core/SkReadBuffer.h ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698