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

Side by Side Diff: src/core/SkSpecialSurface.cpp

Issue 2186073002: Rename GrContext's newDrawContext & drawContext to makeDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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/core/SkImageFilter.cpp ('k') | src/effects/SkAlphaThresholdFilter.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 2016 Google Inc. 2 * Copyright 2016 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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkSpecialImage.h" 9 #include "SkSpecialImage.h"
10 #include "SkSpecialSurface.h" 10 #include "SkSpecialSurface.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 }; 154 };
155 155
156 sk_sp<SkSpecialSurface> SkSpecialSurface::MakeRenderTarget(GrContext* context, 156 sk_sp<SkSpecialSurface> SkSpecialSurface::MakeRenderTarget(GrContext* context,
157 int width, int height , 157 int width, int height ,
158 GrPixelConfig config, 158 GrPixelConfig config,
159 sk_sp<SkColorSpace> c olorSpace) { 159 sk_sp<SkColorSpace> c olorSpace) {
160 if (!context) { 160 if (!context) {
161 return nullptr; 161 return nullptr;
162 } 162 }
163 163
164 sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kAppr ox, 164 sk_sp<GrDrawContext> drawContext(context->makeDrawContext(SkBackingFit::kApp rox,
165 width, height, conf ig, 165 width, height, con fig,
166 std::move(colorSpac e))); 166 std::move(colorSpa ce)));
167 if (!drawContext) { 167 if (!drawContext) {
168 return nullptr; 168 return nullptr;
169 } 169 }
170 170
171 const SkIRect subset = SkIRect::MakeWH(width, height); 171 const SkIRect subset = SkIRect::MakeWH(width, height);
172 172
173 return sk_make_sp<SkSpecialSurface_Gpu>(std::move(drawContext), width, heigh t, subset); 173 return sk_make_sp<SkSpecialSurface_Gpu>(std::move(drawContext), width, heigh t, subset);
174 } 174 }
175 175
176 #endif 176 #endif
OLDNEW
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698