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

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

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reserve correctly. Created 4 years, 6 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/GrContext.cpp ('k') | src/gpu/GrDefaultGeoProcFactory.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 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 GrDefaultGeoProcFactory_DEFINED 8 #ifndef GrDefaultGeoProcFactory_DEFINED
9 #define GrDefaultGeoProcFactory_DEFINED 9 #define GrDefaultGeoProcFactory_DEFINED
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 LocalCoords(Type type) : fType(type), fMatrix(nullptr) {} 108 LocalCoords(Type type) : fType(type), fMatrix(nullptr) {}
109 LocalCoords(Type type, const SkMatrix* matrix) : fType(type), fMatrix(ma trix) { 109 LocalCoords(Type type, const SkMatrix* matrix) : fType(type), fMatrix(ma trix) {
110 SkASSERT(kUnused_Type != type); 110 SkASSERT(kUnused_Type != type);
111 } 111 }
112 bool hasLocalMatrix() const { return nullptr != fMatrix; } 112 bool hasLocalMatrix() const { return nullptr != fMatrix; }
113 113
114 Type fType; 114 Type fType;
115 const SkMatrix* fMatrix; 115 const SkMatrix* fMatrix;
116 }; 116 };
117 117
118 const GrGeometryProcessor* Create(const Color&, 118 sk_sp<GrGeometryProcessor> Make(const Color&,
119 const Coverage&, 119 const Coverage&,
120 const LocalCoords&, 120 const LocalCoords&,
121 const SkMatrix& viewMatrix); 121 const SkMatrix& viewMatrix);
122 122
123 /* 123 /*
124 * Use this factory to create a GrGeometryProcessor that expects a device sp ace vertex position 124 * Use this factory to create a GrGeometryProcessor that expects a device sp ace vertex position
125 * attribute. The view matrix must still be provided to compute correctly tr ansformed 125 * attribute. The view matrix must still be provided to compute correctly tr ansformed
126 * coordinates for GrFragmentProcessors. It may fail if the view matrix is n ot invertible. 126 * coordinates for GrFragmentProcessors. It may fail if the view matrix is n ot invertible.
127 */ 127 */
128 const GrGeometryProcessor* CreateForDeviceSpace(const Color&, 128 sk_sp<GrGeometryProcessor> MakeForDeviceSpace(const Color&,
129 const Coverage&, 129 const Coverage&,
130 const LocalCoords&, 130 const LocalCoords&,
131 const SkMatrix& viewMatrix); 131 const SkMatrix& viewMatrix);
132 132
133 inline size_t DefaultVertexStride() { return sizeof(PositionAttr); } 133 inline size_t DefaultVertexStride() { return sizeof(PositionAttr); }
134 }; 134 };
135 135
136 #endif 136 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrDefaultGeoProcFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698