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

Side by Side Diff: tests/ImageFilterTest.cpp

Issue 210443002: Fix Mac Debug clang build. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 "SkBicubicImageFilter.h" 8 #include "SkBicubicImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkBitmapDevice.h" 10 #include "SkBitmapDevice.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 recordingCanvas->save(); 288 recordingCanvas->save();
289 recordingCanvas->scale(SkIntToScalar(10), SkIntToScalar(10)); 289 recordingCanvas->scale(SkIntToScalar(10), SkIntToScalar(10));
290 recordingCanvas->drawRect(SkRect::Make(SkIRect::MakeWH(100, 100)), solidPain t); 290 recordingCanvas->drawRect(SkRect::Make(SkIRect::MakeWH(100, 100)), solidPain t);
291 recordingCanvas->restore(); // scale 291 recordingCanvas->restore(); // scale
292 recordingCanvas->restore(); // saveLayer 292 recordingCanvas->restore(); // saveLayer
293 picture.endRecording(); 293 picture.endRecording();
294 294
295 canvas.drawPicture(picture); 295 canvas.drawPicture(picture);
296 } 296 }
297 297
298 void test_huge_blur(SkBaseDevice* device, skiatest::Reporter* reporter) { 298 static void test_huge_blur(SkBaseDevice* device, skiatest::Reporter* reporter) {
299 SkCanvas canvas(device); 299 SkCanvas canvas(device);
300 300
301 SkBitmap bitmap; 301 SkBitmap bitmap;
302 bitmap.allocN32Pixels(100, 100); 302 bitmap.allocN32Pixels(100, 100);
303 bitmap.eraseARGB(0, 0, 0, 0); 303 bitmap.eraseARGB(0, 0, 0, 0);
304 304
305 // Check that a blur with an insane radius does not crash or assert. 305 // Check that a blur with an insane radius does not crash or assert.
306 SkAutoTUnref<SkImageFilter> blur(SkBlurImageFilter::Create(SkIntToScalar(1<< 30), SkIntToScalar(1<<30))); 306 SkAutoTUnref<SkImageFilter> blur(SkBlurImageFilter::Create(SkIntToScalar(1<< 30), SkIntToScalar(1<<30)));
307 307
308 SkPaint paint; 308 SkPaint paint;
(...skipping 19 matching lines...) Expand all
328 } 328 }
329 329
330 DEF_GPUTEST(HugeBlurImageFilterGPU, reporter, factory) { 330 DEF_GPUTEST(HugeBlurImageFilterGPU, reporter, factory) {
331 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp e>(0)); 331 GrContext* context = factory->get(static_cast<GrContextFactory::GLContextTyp e>(0));
332 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context, 332 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context,
333 SkImageInfo::MakeN32Pre mul(100, 100), 333 SkImageInfo::MakeN32Pre mul(100, 100),
334 0)); 334 0));
335 test_huge_blur(device, reporter); 335 test_huge_blur(device, reporter);
336 } 336 }
337 #endif 337 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698