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

Side by Side Diff: src/gpu/GrPathRange.h

Issue 488463004: Revert of Make GrGpuResources register with GrResourceCache2 after fully constructed. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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/gpu/GrGpuResource.cpp ('k') | src/gpu/GrResourceCache2.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 2014 Google Inc. 2 * Copyright 2014 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 GrPathRange_DEFINED 8 #ifndef GrPathRange_DEFINED
9 #define GrPathRange_DEFINED 9 #define GrPathRange_DEFINED
10 10
(...skipping 20 matching lines...) Expand all
31 return type; 31 return type;
32 } 32 }
33 33
34 /** 34 /**
35 * Initialize to a range with a fixed size and stroke. Stroke must not be ha irline. 35 * Initialize to a range with a fixed size and stroke. Stroke must not be ha irline.
36 */ 36 */
37 GrPathRange(GrGpu* gpu, size_t size, const SkStrokeRec& stroke) 37 GrPathRange(GrGpu* gpu, size_t size, const SkStrokeRec& stroke)
38 : INHERITED(gpu, kIsWrapped), 38 : INHERITED(gpu, kIsWrapped),
39 fSize(size), 39 fSize(size),
40 fStroke(stroke) { 40 fStroke(stroke) {
41 this->registerWithCache();
42 } 41 }
43 42
44 size_t getSize() const { return fSize; } 43 size_t getSize() const { return fSize; }
45 const SkStrokeRec& getStroke() const { return fStroke; } 44 const SkStrokeRec& getStroke() const { return fStroke; }
46 45
47 /** 46 /**
48 * Initialize a path in the range. It is invalid to call this method for a 47 * Initialize a path in the range. It is invalid to call this method for a
49 * path that has already been initialized. 48 * path that has already been initialized.
50 */ 49 */
51 virtual void initAt(size_t index, const SkPath&) = 0; 50 virtual void initAt(size_t index, const SkPath&) = 0;
52 51
53 protected: 52 protected:
54 size_t fSize; 53 size_t fSize;
55 SkStrokeRec fStroke; 54 SkStrokeRec fStroke;
56 55
57 private: 56 private:
58 typedef GrGpuResource INHERITED; 57 typedef GrGpuResource INHERITED;
59 }; 58 };
60 59
61 #endif 60 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrGpuResource.cpp ('k') | src/gpu/GrResourceCache2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698