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

Side by Side Diff: src/gpu/GrGpu.cpp

Issue 1138223003: Add check in GrGpu createTexture to make sure we don't create multisampled textures. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 if (!this->caps()->isConfigTexturable(desc.fConfig)) { 70 if (!this->caps()->isConfigTexturable(desc.fConfig)) {
71 return NULL; 71 return NULL;
72 } 72 }
73 73
74 bool isRT = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag); 74 bool isRT = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag);
75 if (isRT && !this->caps()->isConfigRenderable(desc.fConfig, desc.fSampleCnt > 0)) { 75 if (isRT && !this->caps()->isConfigRenderable(desc.fConfig, desc.fSampleCnt > 0)) {
76 return NULL; 76 return NULL;
77 } 77 }
78 78
79 // We currently not support multisampled textures
80 if (!isRT && desc.fSampleCnt > 0) {
81 return NULL;
82 }
83
79 GrTexture *tex = NULL; 84 GrTexture *tex = NULL;
80 85
81 if (isRT) { 86 if (isRT) {
82 int maxRTSize = this->caps()->maxRenderTargetSize(); 87 int maxRTSize = this->caps()->maxRenderTargetSize();
83 if (desc.fWidth > maxRTSize || desc.fHeight > maxRTSize) { 88 if (desc.fWidth > maxRTSize || desc.fHeight > maxRTSize) {
84 return NULL; 89 return NULL;
85 } 90 }
86 } else { 91 } else {
87 int maxSize = this->caps()->maxTextureSize(); 92 int maxSize = this->caps()->maxTextureSize();
88 if (desc.fWidth > maxSize || desc.fHeight > maxSize) { 93 if (desc.fWidth > maxSize || desc.fHeight > maxSize) {
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 GrDrawTarget::PathIndexType indexType, 319 GrDrawTarget::PathIndexType indexType,
315 const float transformValues[], 320 const float transformValues[],
316 GrDrawTarget::PathTransformType transformType, 321 GrDrawTarget::PathTransformType transformType,
317 int count, 322 int count,
318 const GrStencilSettings& stencilSettings) { 323 const GrStencilSettings& stencilSettings) {
319 this->handleDirtyContext(); 324 this->handleDirtyContext();
320 pathRange->willDrawPaths(indices, indexType, count); 325 pathRange->willDrawPaths(indices, indexType, count);
321 this->onDrawPaths(args, pathRange, indices, indexType, transformValues, 326 this->onDrawPaths(args, pathRange, indices, indexType, transformValues,
322 transformType, count, stencilSettings); 327 transformType, count, stencilSettings);
323 } 328 }
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