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

Side by Side Diff: tests/ImageFilterTest.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 | « tests/GLProgramsTest.cpp ('k') | tests/PrimitiveProcessorTest.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 Google Inc. 2 * Copyright 2013 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkBlurImageFilter.h" 9 #include "SkBlurImageFilter.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 sk_sp<SkColorFilter> filter(SkColorFilter::MakeModeFilter(SK_ColorBLUE, 360 sk_sp<SkColorFilter> filter(SkColorFilter::MakeModeFilter(SK_ColorBLUE,
361 SkXfermode::kSrcIn _Mode)); 361 SkXfermode::kSrcIn _Mode));
362 return SkColorFilterImageFilter::Make(std::move(filter), std::move(input), c ropRect); 362 return SkColorFilterImageFilter::Make(std::move(filter), std::move(input), c ropRect);
363 } 363 }
364 364
365 static sk_sp<SkSpecialSurface> create_empty_special_surface(GrContext* context, int widthHeight) { 365 static sk_sp<SkSpecialSurface> create_empty_special_surface(GrContext* context, int widthHeight) {
366 #if SK_SUPPORT_GPU 366 #if SK_SUPPORT_GPU
367 if (context) { 367 if (context) {
368 return SkSpecialSurface::MakeRenderTarget(context, 368 return SkSpecialSurface::MakeRenderTarget(context,
369 widthHeight, widthHeight, 369 widthHeight, widthHeight,
370 kSkia8888_GrPixelConfig); 370 kSkia8888_GrPixelConfig, nullp tr);
371 } else 371 } else
372 #endif 372 #endif
373 { 373 {
374 const SkImageInfo info = SkImageInfo::MakeN32(widthHeight, widthHeight, 374 const SkImageInfo info = SkImageInfo::MakeN32(widthHeight, widthHeight,
375 kOpaque_SkAlphaType); 375 kOpaque_SkAlphaType);
376 return SkSpecialSurface::MakeRaster(info); 376 return SkSpecialSurface::MakeRaster(info);
377 } 377 }
378 } 378 }
379 379
380 static sk_sp<SkSurface> create_surface(GrContext* context, int width, int height ) { 380 static sk_sp<SkSurface> create_surface(GrContext* context, int width, int height ) {
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1854 { SkColorFilterImageFilter::Make(cf, blif), false }, 1854 { SkColorFilterImageFilter::Make(cf, blif), false },
1855 { SkMergeImageFilter::Make(cfif, blif), false }, 1855 { SkMergeImageFilter::Make(cfif, blif), false },
1856 { SkComposeImageFilter::Make(blif, cfif), false }, 1856 { SkComposeImageFilter::Make(blif, cfif), false },
1857 }; 1857 };
1858 1858
1859 for (const auto& rec : recs) { 1859 for (const auto& rec : recs) {
1860 const bool canHandle = rec.fFilter->canHandleComplexCTM(); 1860 const bool canHandle = rec.fFilter->canHandleComplexCTM();
1861 REPORTER_ASSERT(reporter, canHandle == rec.fExpectCanHandle); 1861 REPORTER_ASSERT(reporter, canHandle == rec.fExpectCanHandle);
1862 } 1862 }
1863 } 1863 }
OLDNEW
« no previous file with comments | « tests/GLProgramsTest.cpp ('k') | tests/PrimitiveProcessorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698