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

Side by Side Diff: tests/BlurTest.cpp

Issue 682223002: rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: const Created 6 years, 1 month 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/image/SkSurface_Gpu.cpp ('k') | tests/ClipCacheTest.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 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // temporary disable; see below for explanation 277 // temporary disable; see below for explanation
278 static bool gpu_blur_path(GrContextFactory* factory, const SkPath& path, 278 static bool gpu_blur_path(GrContextFactory* factory, const SkPath& path,
279 SkScalar gaussianSigma, 279 SkScalar gaussianSigma,
280 int* result, int resultCount) { 280 int* result, int resultCount) {
281 281
282 GrContext* grContext = factory->get(GrContextFactory::kNative_GLContextType) ; 282 GrContext* grContext = factory->get(GrContextFactory::kNative_GLContextType) ;
283 if (NULL == grContext) { 283 if (NULL == grContext) {
284 return false; 284 return false;
285 } 285 }
286 286
287 GrTextureDesc desc; 287 GrSurfaceDesc desc;
288 desc.fConfig = kSkia8888_GrPixelConfig; 288 desc.fConfig = kSkia8888_GrPixelConfig;
289 desc.fFlags = kRenderTarget_GrTextureFlagBit; 289 desc.fFlags = kRenderTarget_GrSurfaceFlag;
290 desc.fWidth = resultCount; 290 desc.fWidth = resultCount;
291 desc.fHeight = 30; 291 desc.fHeight = 30;
292 desc.fSampleCnt = 0; 292 desc.fSampleCnt = 0;
293 293
294 SkAutoTUnref<GrTexture> texture(grContext->createUncachedTexture(desc, NULL, 0)); 294 SkAutoTUnref<GrTexture> texture(grContext->createUncachedTexture(desc, NULL, 0));
295 SkAutoTUnref<SkGpuDevice> device(SkNEW_ARGS(SkGpuDevice, (grContext, texture .get()))); 295 SkAutoTUnref<SkGpuDevice> device(SkNEW_ARGS(SkGpuDevice, (grContext, texture .get())));
296 SkCanvas canvas(device.get()); 296 SkCanvas canvas(device.get());
297 297
298 blur_path(&canvas, path, gaussianSigma); 298 blur_path(&canvas, path, gaussianSigma);
299 readback(&canvas, result, resultCount); 299 readback(&canvas, result, resultCount);
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 } 564 }
565 } 565 }
566 566
567 //////////////////////////////////////////////////////////////////////////////// /////////// 567 //////////////////////////////////////////////////////////////////////////////// ///////////
568 568
569 DEF_GPUTEST(Blur, reporter, factory) { 569 DEF_GPUTEST(Blur, reporter, factory) {
570 test_blur_drawing(reporter); 570 test_blur_drawing(reporter);
571 test_sigma_range(reporter, factory); 571 test_sigma_range(reporter, factory);
572 test_asABlur(reporter); 572 test_asABlur(reporter);
573 } 573 }
OLDNEW
« no previous file with comments | « src/image/SkSurface_Gpu.cpp ('k') | tests/ClipCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698