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

Side by Side Diff: src/image/SkSurface_Base.h

Issue 583773004: Revert of introduce Props to surface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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.cpp ('k') | src/image/SkSurface_Gpu.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 #ifndef SkSurface_Base_DEFINED 8 #ifndef SkSurface_Base_DEFINED
9 #define SkSurface_Base_DEFINED 9 #define SkSurface_Base_DEFINED
10 10
11 #include "SkSurface.h"
11 #include "SkCanvas.h" 12 #include "SkCanvas.h"
12 #include "SkSurface.h"
13 #include "SkSurfacePriv.h"
14 13
15 class SkSurface_Base : public SkSurface { 14 class SkSurface_Base : public SkSurface {
16 public: 15 public:
17 SkSurface_Base(int width, int height, const SkSurfaceProps*); 16 SkSurface_Base(int width, int height);
18 SkSurface_Base(const SkImageInfo&, const SkSurfaceProps*); 17 explicit SkSurface_Base(const SkImageInfo&);
19 virtual ~SkSurface_Base(); 18 virtual ~SkSurface_Base();
20 19
21 /** 20 /**
22 * Allocate a canvas that will draw into this surface. We will cache this 21 * Allocate a canvas that will draw into this surface. We will cache this
23 * canvas, to return the same object to the caller multiple times. We 22 * canvas, to return the same object to the caller multiple times. We
24 * take ownership, and will call unref() on the canvas when we go out of 23 * take ownership, and will call unref() on the canvas when we go out of
25 * scope. 24 * scope.
26 */ 25 */
27 virtual SkCanvas* onNewCanvas() = 0; 26 virtual SkCanvas* onNewCanvas() = 0;
28 27
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 88
90 SkImage* SkSurface_Base::getCachedImage() { 89 SkImage* SkSurface_Base::getCachedImage() {
91 if (NULL == fCachedImage) { 90 if (NULL == fCachedImage) {
92 fCachedImage = this->onNewImageSnapshot(); 91 fCachedImage = this->onNewImageSnapshot();
93 SkASSERT(!fCachedCanvas || fCachedCanvas->getSurfaceBase() == this); 92 SkASSERT(!fCachedCanvas || fCachedCanvas->getSurfaceBase() == this);
94 } 93 }
95 return fCachedImage; 94 return fCachedImage;
96 } 95 }
97 96
98 #endif 97 #endif
OLDNEW
« no previous file with comments | « src/image/SkSurface.cpp ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698