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

Side by Side Diff: tests/ProxyTest.cpp

Issue 1967503004: Fix AllocedProxyTest on Mesa (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up Created 4 years, 7 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 | « 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 2016 Google Inc. 2 * Copyright 2016 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 // This is a GPU-backend specific test. 8 // This is a GPU-backend specific test.
9 9
10 #include "Test.h" 10 #include "Test.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(AllocedProxyTest, reporter, ctxInfo) { 78 DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(AllocedProxyTest, reporter, ctxInfo) {
79 GrTextureProvider* provider = ctxInfo.fGrContext->textureProvider(); 79 GrTextureProvider* provider = ctxInfo.fGrContext->textureProvider();
80 80
81 for (auto origin : { kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin } ) { 81 for (auto origin : { kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin } ) {
82 for (auto widthHeight : { 100, 128 }) { 82 for (auto widthHeight : { 100, 128 }) {
83 for (auto config : { kAlpha_8_GrPixelConfig, kRGBA_8888_GrPixelConfi g }) { 83 for (auto config : { kAlpha_8_GrPixelConfig, kRGBA_8888_GrPixelConfi g }) {
84 for (auto fit : { SkBackingFit::kExact, SkBackingFit::kApprox }) { 84 for (auto fit : { SkBackingFit::kExact, SkBackingFit::kApprox }) {
85 for (auto budgeted : { SkBudgeted::kYes, SkBudgeted::kNo }) { 85 for (auto budgeted : { SkBudgeted::kYes, SkBudgeted::kNo }) {
86 for (auto numSamples : { 0, 4}) { 86 for (auto numSamples : { 0, 4}) {
87 bool renderable = ctxInfo.fGrContext->caps()->isConf igRenderable( 87 bool renderable = ctxInfo.fGrContext->caps()->isConf igRenderable(
88 config, nu mSamples > 0); 88 config, nu mSamples > 0) &&
89 numSamples <= ctxInfo.fGrContext->caps()->maxC olorSampleCount();
89 90
90 GrSurfaceDesc desc; 91 GrSurfaceDesc desc;
91 desc.fOrigin = origin; 92 desc.fOrigin = origin;
92 desc.fWidth = widthHeight; 93 desc.fWidth = widthHeight;
93 desc.fHeight = widthHeight; 94 desc.fHeight = widthHeight;
94 desc.fConfig = config; 95 desc.fConfig = config;
95 desc.fSampleCnt = numSamples; 96 desc.fSampleCnt = numSamples;
96 97
97 if (renderable) { 98 if (renderable) {
98 sk_sp<GrRenderTargetProxy> rtProxy(GrRenderTarge tProxy::Make( 99 sk_sp<GrRenderTargetProxy> rtProxy(GrRenderTarge tProxy::Make(
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 check_surface(reporter, texProxy.get(), origin, 164 check_surface(reporter, texProxy.get(), origin,
164 kWidthHeight, kWidthHeight, config); 165 kWidthHeight, kWidthHeight, config);
165 check_texture(reporter, provider, texProxy.get(), SkBackingF it::kExact); 166 check_texture(reporter, provider, texProxy.get(), SkBackingF it::kExact);
166 } 167 }
167 } 168 }
168 } 169 }
169 } 170 }
170 } 171 }
171 172
172 #endif 173 #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