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

Side by Side Diff: tests/GpuDrawPathTest.cpp

Issue 848903004: Require budget decision when creating a RenderTarget SkSurface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make compatible with chrome Created 5 years, 11 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 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 #if SK_SUPPORT_GPU 8 #if SK_SUPPORT_GPU
9 9
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 GrContext* grContext = factory->get(glType); 50 GrContext* grContext = factory->get(glType);
51 if (NULL == grContext) { 51 if (NULL == grContext) {
52 continue; 52 continue;
53 } 53 }
54 static const int sampleCounts[] = { 0, 4, 16 }; 54 static const int sampleCounts[] = { 0, 4, 16 };
55 55
56 for (size_t i = 0; i < SK_ARRAY_COUNT(sampleCounts); ++i) { 56 for (size_t i = 0; i < SK_ARRAY_COUNT(sampleCounts); ++i) {
57 SkImageInfo info = SkImageInfo::MakeN32Premul(255, 255); 57 SkImageInfo info = SkImageInfo::MakeN32Premul(255, 255);
58 58
59 SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(grContext , info, 59 SkAutoTUnref<SkSurface> surface(
60 sampleCou nts[i], NULL)); 60 SkSurface::NewRenderTarget(grContext, SkSurface::kNo_Budgeted, i nfo,
61 sampleCounts[i], NULL));
61 test_drawPathEmpty(reporter, surface->getCanvas()); 62 test_drawPathEmpty(reporter, surface->getCanvas());
62 } 63 }
63 } 64 }
64 } 65 }
65 66
66 #endif 67 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698