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

Side by Side Diff: src/image/SkImage_Raster.cpp

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 | « src/image/SkImage_Gpu.h ('k') | src/image/SkSurface_Gpu.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 2012 Google Inc. 2 * Copyright 2012 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 #include "SkImage_Base.h" 8 #include "SkImage_Base.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 int64_t size = (int64_t)info.height() * rowBytes; 46 int64_t size = (int64_t)info.height() * rowBytes;
47 if (size > (int64_t)kMaxPixelByteSize) { 47 if (size > (int64_t)kMaxPixelByteSize) {
48 return false; 48 return false;
49 } 49 }
50 return true; 50 return true;
51 } 51 }
52 52
53 SkImage_Raster(const SkImageInfo&, SkData*, size_t rb, const SkSurfaceProps* ); 53 SkImage_Raster(const SkImageInfo&, SkData*, size_t rb, const SkSurfaceProps* );
54 virtual ~SkImage_Raster(); 54 virtual ~SkImage_Raster();
55 55
56 void onDraw(SkCanvas*, SkScalar, SkScalar, const SkPaint*) const SK_OVERRIDE ; 56 void onDraw(SkCanvas*, SkScalar, SkScalar, const SkPaint*) const override;
57 void onDrawRect(SkCanvas*, const SkRect*, const SkRect&, const SkPaint*) con st SK_OVERRIDE; 57 void onDrawRect(SkCanvas*, const SkRect*, const SkRect&, const SkPaint*) con st override;
58 SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) const SK_ OVERRIDE; 58 SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) const ove rride;
59 bool onReadPixels(const SkImageInfo&, void*, size_t, int srcX, int srcY) con st SK_OVERRIDE; 59 bool onReadPixels(const SkImageInfo&, void*, size_t, int srcX, int srcY) con st override;
60 const void* onPeekPixels(SkImageInfo*, size_t* /*rowBytes*/) const SK_OVERRI DE; 60 const void* onPeekPixels(SkImageInfo*, size_t* /*rowBytes*/) const override;
61 bool getROPixels(SkBitmap*) const SK_OVERRIDE; 61 bool getROPixels(SkBitmap*) const override;
62 62
63 // exposed for SkSurface_Raster via SkNewImageFromPixelRef 63 // exposed for SkSurface_Raster via SkNewImageFromPixelRef
64 SkImage_Raster(const SkImageInfo&, SkPixelRef*, const SkIPoint& pixelRefOrig in, size_t rowBytes, 64 SkImage_Raster(const SkImageInfo&, SkPixelRef*, const SkIPoint& pixelRefOrig in, size_t rowBytes,
65 const SkSurfaceProps*); 65 const SkSurfaceProps*);
66 66
67 SkPixelRef* getPixelRef() const { return fBitmap.pixelRef(); } 67 SkPixelRef* getPixelRef() const { return fBitmap.pixelRef(); }
68 68
69 virtual SkShader* onNewShader(SkShader::TileMode, 69 virtual SkShader* onNewShader(SkShader::TileMode,
70 SkShader::TileMode, 70 SkShader::TileMode,
71 const SkMatrix* localMatrix) const SK_OVERRIDE ; 71 const SkMatrix* localMatrix) const override;
72 72
73 bool isOpaque() const SK_OVERRIDE; 73 bool isOpaque() const override;
74 74
75 SkImage_Raster(const SkBitmap& bm, const SkSurfaceProps* props) 75 SkImage_Raster(const SkBitmap& bm, const SkSurfaceProps* props)
76 : INHERITED(bm.width(), bm.height(), props) 76 : INHERITED(bm.width(), bm.height(), props)
77 , fBitmap(bm) {} 77 , fBitmap(bm) {}
78 78
79 private: 79 private:
80 SkImage_Raster() : INHERITED(0, 0, NULL) {} 80 SkImage_Raster() : INHERITED(0, 0, NULL) {}
81 81
82 SkBitmap fBitmap; 82 SkBitmap fBitmap;
83 83
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 229 }
230 230
231 const SkPixelRef* SkBitmapImageGetPixelRef(const SkImage* image) { 231 const SkPixelRef* SkBitmapImageGetPixelRef(const SkImage* image) {
232 return ((const SkImage_Raster*)image)->getPixelRef(); 232 return ((const SkImage_Raster*)image)->getPixelRef();
233 } 233 }
234 234
235 bool SkImage_Raster::isOpaque() const { 235 bool SkImage_Raster::isOpaque() const {
236 return fBitmap.isOpaque(); 236 return fBitmap.isOpaque();
237 } 237 }
238 238
OLDNEW
« no previous file with comments | « src/image/SkImage_Gpu.h ('k') | src/image/SkSurface_Gpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698