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

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

Issue 2164363002: Add SkColorSpace to GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove ':' from comment Created 4 years, 5 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/SkSpecialSurface.h ('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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 148 }
149 149
150 private: 150 private:
151 sk_sp<GrDrawContext> fDrawContext; 151 sk_sp<GrDrawContext> fDrawContext;
152 152
153 typedef SkSpecialSurface_Base INHERITED; 153 typedef SkSpecialSurface_Base INHERITED;
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 if (!context) { 160 if (!context) {
160 return nullptr; 161 return nullptr;
161 } 162 }
162 163
163 sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kAppr ox, 164 sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kAppr ox,
164 width, height, conf ig)); 165 width, height, conf ig,
166 std::move(colorSpac e)));
165 if (!drawContext) { 167 if (!drawContext) {
166 return nullptr; 168 return nullptr;
167 } 169 }
168 170
169 const SkIRect subset = SkIRect::MakeWH(width, height); 171 const SkIRect subset = SkIRect::MakeWH(width, height);
170 172
171 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);
172 } 174 }
173 175
174 #endif 176 #endif
OLDNEW
« no previous file with comments | « src/core/SkSpecialSurface.h ('k') | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698