OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |