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

Side by Side Diff: src/effects/SkXfermodeImageFilter.cpp

Issue 2163343002: Adding color space to SkSpecialImage (Closed) Base URL: https://skia.googlesource.com/skia.git@colorspace-on-image
Patch Set: Fix compile after rebase 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/effects/SkMorphologyImageFilter.cpp ('k') | src/gpu/SkGpuDevice.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 2013 The Android Open Source Project 2 * Copyright 2013 The Android Open Source Project
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 "SkXfermodeImageFilter.h" 8 #include "SkXfermodeImageFilter.h"
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 bounds.width(), bou nds.height(), 245 bounds.width(), bou nds.height(),
246 kSkia8888_GrPixelCo nfig)); 246 kSkia8888_GrPixelCo nfig));
247 if (!drawContext) { 247 if (!drawContext) {
248 return nullptr; 248 return nullptr;
249 } 249 }
250 250
251 SkMatrix matrix; 251 SkMatrix matrix;
252 matrix.setTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.top ())); 252 matrix.setTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.top ()));
253 drawContext->drawRect(GrNoClip(), paint, matrix, SkRect::Make(bounds)); 253 drawContext->drawRect(GrNoClip(), paint, matrix, SkRect::Make(bounds));
254 254
255 // TODO: Get the colorSpace from the drawContext (once it has one)
255 return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(bounds.width(), bounds.he ight()), 256 return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(bounds.width(), bounds.he ight()),
256 kNeedNewImageUniqueID_SpecialImage, 257 kNeedNewImageUniqueID_SpecialImage,
257 drawContext->asTexture()); 258 drawContext->asTexture(),
259 sk_ref_sp(source->getColorSpace()));
258 } 260 }
259 261
260 #endif 262 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698