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

Side by Side Diff: tests/BlurTest.cpp

Issue 319043005: Support using OpenGL ES context on desktop (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 "SkBlurMask.h" 8 #include "SkBlurMask.h"
9 #include "SkBlurMaskFilter.h" 9 #include "SkBlurMaskFilter.h"
10 #include "SkBlurDrawLooper.h" 10 #include "SkBlurDrawLooper.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 blur_path(&canvas, path, gaussianSigma); 271 blur_path(&canvas, path, gaussianSigma);
272 readback(&canvas, result, resultCount); 272 readback(&canvas, result, resultCount);
273 } 273 }
274 274
275 #if SK_SUPPORT_GPU 275 #if SK_SUPPORT_GPU
276 static bool gpu_blur_path(GrContextFactory* factory, const SkPath& path, 276 static bool gpu_blur_path(GrContextFactory* factory, const SkPath& path,
277 SkScalar gaussianSigma, 277 SkScalar gaussianSigma,
278 int* result, int resultCount) { 278 int* result, int resultCount) {
279 279
280 GrContext* grContext = factory->get(GrContextFactory::kNative_GLContextType) ; 280 GrContext* grContext = factory->get(GrContextFactory::kNative_GLContextType,
281 kNone_GrGLStandard);
mtklein 2014/06/09 14:10:46 Passing kNone in all these tests reads weird. Can
robertphillips 2014/06/09 14:31:05 I agree - it is kind of weird.
Kimmo Kinnunen 2014/06/16 12:36:40 That would be double the weird for all the other f
281 if (NULL == grContext) { 282 if (NULL == grContext) {
282 return false; 283 return false;
283 } 284 }
284 285
285 GrTextureDesc desc; 286 GrTextureDesc desc;
286 desc.fConfig = kSkia8888_GrPixelConfig; 287 desc.fConfig = kSkia8888_GrPixelConfig;
287 desc.fFlags = kRenderTarget_GrTextureFlagBit; 288 desc.fFlags = kRenderTarget_GrTextureFlagBit;
288 desc.fWidth = resultCount; 289 desc.fWidth = resultCount;
289 desc.fHeight = 30; 290 desc.fHeight = 30;
290 desc.fSampleCnt = 0; 291 desc.fSampleCnt = 0;
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 } 561 }
561 } 562 }
562 563
563 //////////////////////////////////////////////////////////////////////////////// /////////// 564 //////////////////////////////////////////////////////////////////////////////// ///////////
564 565
565 DEF_GPUTEST(Blur, reporter, factory) { 566 DEF_GPUTEST(Blur, reporter, factory) {
566 test_blur_drawing(reporter); 567 test_blur_drawing(reporter);
567 test_sigma_range(reporter, factory); 568 test_sigma_range(reporter, factory);
568 test_asABlur(reporter); 569 test_asABlur(reporter);
569 } 570 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698