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

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

Issue 68973005: Expand pixelref to return SkImageInfo and rowbytes (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
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 10 matching lines...) Expand all
21 * Common baseclass that implements onLockPixels() by calling onReadPixels(). 21 * Common baseclass that implements onLockPixels() by calling onReadPixels().
22 * Since it has a copy, it always returns false for onLockPixelsAreWritable(). 22 * Since it has a copy, it always returns false for onLockPixelsAreWritable().
23 */ 23 */
24 class SK_API SkROLockPixelsPixelRef : public SkPixelRef { 24 class SK_API SkROLockPixelsPixelRef : public SkPixelRef {
25 public: 25 public:
26 SkROLockPixelsPixelRef(); 26 SkROLockPixelsPixelRef();
27 virtual ~SkROLockPixelsPixelRef(); 27 virtual ~SkROLockPixelsPixelRef();
28 28
29 protected: 29 protected:
30 // override from SkPixelRef 30 // override from SkPixelRef
31 virtual void* onLockPixels(SkColorTable** ptr); 31 virtual void* onLockPixels(SkImageInfo*, size_t* rowBytes, SkColorTable**) S K_OVERRIDE;
32 virtual void onUnlockPixels(); 32 virtual void onUnlockPixels() SK_OVERRIDE;
33 virtual bool onLockPixelsAreWritable() const; // return false; 33 virtual bool onLockPixelsAreWritable() const SK_OVERRIDE; // return false;
34 34
35 private: 35 private:
36 SkBitmap fBitmap; 36 SkBitmap fBitmap;
37 typedef SkPixelRef INHERITED; 37 typedef SkPixelRef INHERITED;
38 }; 38 };
39 39
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 {
(...skipping 17 matching lines...) Expand all
61 virtual SkPixelRef* deepCopy(SkBitmap::Config dstConfig, const SkIRect* subs et) SK_OVERRIDE; 61 virtual SkPixelRef* deepCopy(SkBitmap::Config dstConfig, const SkIRect* subs et) SK_OVERRIDE;
62 62
63 private: 63 private:
64 GrSurface* fSurface; 64 GrSurface* fSurface;
65 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
66 66
67 typedef SkROLockPixelsPixelRef INHERITED; 67 typedef SkROLockPixelsPixelRef INHERITED;
68 }; 68 };
69 69
70 #endif 70 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698