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

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

Issue 1086143003: Update more directories under src/ to follow C++11 style rule for {virtual,override}. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: no copyright Created 5 years, 7 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/SkSurface_Gpu.h ('k') | src/images/SkDecodingImageGenerator.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 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 "SkSurface_Base.h" 8 #include "SkSurface_Base.h"
9 #include "SkImagePriv.h" 9 #include "SkImagePriv.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
11 #include "SkDevice.h" 11 #include "SkDevice.h"
12 #include "SkMallocPixelRef.h" 12 #include "SkMallocPixelRef.h"
13 13
14 static const size_t kIgnoreRowBytesValue = (size_t)~0; 14 static const size_t kIgnoreRowBytesValue = (size_t)~0;
15 15
16 class SkSurface_Raster : public SkSurface_Base { 16 class SkSurface_Raster : public SkSurface_Base {
17 public: 17 public:
18 static bool Valid(const SkImageInfo&, size_t rb = kIgnoreRowBytesValue); 18 static bool Valid(const SkImageInfo&, size_t rb = kIgnoreRowBytesValue);
19 19
20 SkSurface_Raster(const SkImageInfo&, void*, size_t rb, 20 SkSurface_Raster(const SkImageInfo&, void*, size_t rb,
21 void (*releaseProc)(void* pixels, void* context), void* con text, 21 void (*releaseProc)(void* pixels, void* context), void* con text,
22 const SkSurfaceProps*); 22 const SkSurfaceProps*);
23 SkSurface_Raster(SkPixelRef*, const SkSurfaceProps*); 23 SkSurface_Raster(SkPixelRef*, const SkSurfaceProps*);
24 24
25 SkCanvas* onNewCanvas() override; 25 SkCanvas* onNewCanvas() override;
26 SkSurface* onNewSurface(const SkImageInfo&) override; 26 SkSurface* onNewSurface(const SkImageInfo&) override;
27 SkImage* onNewImageSnapshot(Budgeted) override; 27 SkImage* onNewImageSnapshot(Budgeted) override;
28 virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, 28 void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) override;
29 const SkPaint*) override;
30 void onCopyOnWrite(ContentChangeMode) override; 29 void onCopyOnWrite(ContentChangeMode) override;
31 30
32 private: 31 private:
33 SkBitmap fBitmap; 32 SkBitmap fBitmap;
34 bool fWeOwnThePixels; 33 bool fWeOwnThePixels;
35 34
36 typedef SkSurface_Base INHERITED; 35 typedef SkSurface_Base INHERITED;
37 }; 36 };
38 37
39 /////////////////////////////////////////////////////////////////////////////// 38 ///////////////////////////////////////////////////////////////////////////////
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 if (!SkSurface_Raster::Valid(info)) { 168 if (!SkSurface_Raster::Valid(info)) {
170 return NULL; 169 return NULL;
171 } 170 }
172 171
173 SkAutoTUnref<SkPixelRef> pr(SkMallocPixelRef::NewAllocate(info, 0, NULL)); 172 SkAutoTUnref<SkPixelRef> pr(SkMallocPixelRef::NewAllocate(info, 0, NULL));
174 if (NULL == pr.get()) { 173 if (NULL == pr.get()) {
175 return NULL; 174 return NULL;
176 } 175 }
177 return SkNEW_ARGS(SkSurface_Raster, (pr, props)); 176 return SkNEW_ARGS(SkSurface_Raster, (pr, props));
178 } 177 }
OLDNEW
« no previous file with comments | « src/image/SkSurface_Gpu.h ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698