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

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

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 years, 9 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/gpu/GrTexture.h ('k') | include/gpu/effects/GrCoverageSetOpXP.h » ('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
11 #include "SkBitmap.h" 11 #include "SkBitmap.h"
12 #include "SkPixelRef.h" 12 #include "SkPixelRef.h"
13 #include "GrTexture.h" 13 #include "GrTexture.h"
14 #include "GrRenderTarget.h" 14 #include "GrRenderTarget.h"
15 15
16 16
17 /** 17 /**
18 * Common baseclass that implements onLockPixels() by calling onReadPixels(). 18 * Common baseclass that implements onLockPixels() by calling onReadPixels().
19 * Since it has a copy, it always returns false for onLockPixelsAreWritable(). 19 * Since it has a copy, it always returns false for onLockPixelsAreWritable().
20 */ 20 */
21 class SK_API SkROLockPixelsPixelRef : public SkPixelRef { 21 class SK_API SkROLockPixelsPixelRef : public SkPixelRef {
22 public: 22 public:
23 SK_DECLARE_INST_COUNT(SkROLockPixelsPixelRef) 23 SK_DECLARE_INST_COUNT(SkROLockPixelsPixelRef)
24 SkROLockPixelsPixelRef(const SkImageInfo&); 24 SkROLockPixelsPixelRef(const SkImageInfo&);
25 virtual ~SkROLockPixelsPixelRef(); 25 virtual ~SkROLockPixelsPixelRef();
26 26
27 protected: 27 protected:
28 bool onNewLockPixels(LockRec*) SK_OVERRIDE; 28 bool onNewLockPixels(LockRec*) override;
29 void onUnlockPixels() SK_OVERRIDE; 29 void onUnlockPixels() override;
30 bool onLockPixelsAreWritable() const SK_OVERRIDE; // return false; 30 bool onLockPixelsAreWritable() const override; // return false;
31 31
32 private: 32 private:
33 SkBitmap fBitmap; 33 SkBitmap fBitmap;
34 typedef SkPixelRef INHERITED; 34 typedef SkPixelRef INHERITED;
35 }; 35 };
36 36
37 /** 37 /**
38 * PixelRef that wraps a GrSurface 38 * PixelRef that wraps a GrSurface
39 */ 39 */
40 class SK_API SkGrPixelRef : public SkROLockPixelsPixelRef { 40 class SK_API SkGrPixelRef : public SkROLockPixelsPixelRef {
41 public: 41 public:
42 SK_DECLARE_INST_COUNT(SkGrPixelRef) 42 SK_DECLARE_INST_COUNT(SkGrPixelRef)
43 /** 43 /**
44 * Constructs a pixel ref around a GrSurface. 44 * Constructs a pixel ref around a GrSurface.
45 */ 45 */
46 SkGrPixelRef(const SkImageInfo&, GrSurface*); 46 SkGrPixelRef(const SkImageInfo&, GrSurface*);
47 virtual ~SkGrPixelRef(); 47 virtual ~SkGrPixelRef();
48 48
49 // override from SkPixelRef 49 // override from SkPixelRef
50 GrTexture* getTexture() SK_OVERRIDE; 50 GrTexture* getTexture() override;
51 51
52 protected: 52 protected:
53 // overrides from SkPixelRef 53 // overrides from SkPixelRef
54 bool onReadPixels(SkBitmap* dst, const SkIRect* subset) SK_OVERRIDE; 54 bool onReadPixels(SkBitmap* dst, const SkIRect* subset) override;
55 virtual SkPixelRef* deepCopy(SkColorType, SkColorProfileType, 55 virtual SkPixelRef* deepCopy(SkColorType, SkColorProfileType,
56 const SkIRect* subset) SK_OVERRIDE; 56 const SkIRect* subset) override;
57 57
58 private: 58 private:
59 GrSurface* fSurface; 59 GrSurface* fSurface;
60 typedef SkROLockPixelsPixelRef INHERITED; 60 typedef SkROLockPixelsPixelRef INHERITED;
61 }; 61 };
62 62
63 #endif 63 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrTexture.h ('k') | include/gpu/effects/GrCoverageSetOpXP.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698