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

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

Issue 104923011: add SkImageInfo to SkGrPixelRef constructor, to prep for larger CL (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/gpu/SkGrPixelRef.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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 29 matching lines...) Expand all
40 /** 40 /**
41 * PixelRef that wraps a GrSurface 41 * PixelRef that wraps a GrSurface
42 */ 42 */
43 class SK_API SkGrPixelRef : public SkROLockPixelsPixelRef { 43 class SK_API SkGrPixelRef : public SkROLockPixelsPixelRef {
44 public: 44 public:
45 /** 45 /**
46 * Constructs a pixel ref around a GrSurface. If the caller has locked the G rSurface in the 46 * Constructs a pixel ref around a GrSurface. If the caller has locked the G rSurface in the
47 * cache and would like the pixel ref to unlock it in its destructor then tr ansferCacheLock 47 * cache and would like the pixel ref to unlock it in its destructor then tr ansferCacheLock
48 * should be set to true. 48 * should be set to true.
49 */ 49 */
50 SkGrPixelRef(GrSurface* surface, bool transferCacheLock = false); 50 SkGrPixelRef(GrSurface*, bool transferCacheLock = false);
51 SkGrPixelRef(const SkImageInfo&, GrSurface*, bool transferCacheLock = false) ;
51 virtual ~SkGrPixelRef(); 52 virtual ~SkGrPixelRef();
52 53
53 // override from SkPixelRef 54 // override from SkPixelRef
54 virtual GrTexture* getTexture() SK_OVERRIDE; 55 virtual GrTexture* getTexture() SK_OVERRIDE;
55 56
56 SK_DECLARE_UNFLATTENABLE_OBJECT() 57 SK_DECLARE_UNFLATTENABLE_OBJECT()
57 58
58 protected: 59 protected:
59 // overrides from SkPixelRef 60 // overrides from SkPixelRef
60 virtual bool onReadPixels(SkBitmap* dst, const SkIRect* subset) SK_OVERRIDE; 61 virtual bool onReadPixels(SkBitmap* dst, const SkIRect* subset) SK_OVERRIDE;
61 virtual SkPixelRef* deepCopy(SkBitmap::Config dstConfig, const SkIRect* subs et) SK_OVERRIDE; 62 virtual SkPixelRef* deepCopy(SkBitmap::Config dstConfig, const SkIRect* subs et) SK_OVERRIDE;
62 63
63 private: 64 private:
64 GrSurface* fSurface; 65 GrSurface* fSurface;
65 bool fUnlock; // if true the pixel ref owns a texture cache lock on fSurface 66 bool fUnlock; // if true the pixel ref owns a texture cache lock on fSurface
66 67
67 typedef SkROLockPixelsPixelRef INHERITED; 68 typedef SkROLockPixelsPixelRef INHERITED;
68 }; 69 };
69 70
70 #endif 71 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/SkGrPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698