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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 if (!this->caps()->isConfigTexturable(desc.fConfig)) { | 72 if (!this->caps()->isConfigTexturable(desc.fConfig)) { |
73 return NULL; | 73 return NULL; |
74 } | 74 } |
75 | 75 |
76 bool isRT = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag); | 76 bool isRT = SkToBool(desc.fFlags & kRenderTarget_GrSurfaceFlag); |
77 if (isRT && !this->caps()->isConfigRenderable(desc.fConfig, desc.fSampleCnt
> 0)) { | 77 if (isRT && !this->caps()->isConfigRenderable(desc.fConfig, desc.fSampleCnt
> 0)) { |
78 return NULL; | 78 return NULL; |
79 } | 79 } |
80 | 80 |
81 // We currently not support multisampled textures | 81 // We currently do not support multisampled textures |
82 if (!isRT && desc.fSampleCnt > 0) { | 82 if (!isRT && desc.fSampleCnt > 0) { |
83 return NULL; | 83 return NULL; |
84 } | 84 } |
85 | 85 |
86 GrTexture *tex = NULL; | 86 GrTexture *tex = NULL; |
87 | 87 |
88 if (isRT) { | 88 if (isRT) { |
89 int maxRTSize = this->caps()->maxRenderTargetSize(); | 89 int maxRTSize = this->caps()->maxRenderTargetSize(); |
90 if (desc.fWidth > maxRTSize || desc.fHeight > maxRTSize) { | 90 if (desc.fWidth > maxRTSize || desc.fHeight > maxRTSize) { |
91 return NULL; | 91 return NULL; |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 //////////////////////////////////////////////////////////////////////////////// | 380 //////////////////////////////////////////////////////////////////////////////// |
381 | 381 |
382 void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) { | 382 void GrGpu::draw(const DrawArgs& args, const GrVertices& vertices) { |
383 this->handleDirtyContext(); | 383 this->handleDirtyContext(); |
384 GrVertices::Iterator iter; | 384 GrVertices::Iterator iter; |
385 const GrNonInstancedVertices* verts = iter.init(vertices); | 385 const GrNonInstancedVertices* verts = iter.init(vertices); |
386 do { | 386 do { |
387 this->onDraw(args, *verts); | 387 this->onDraw(args, *verts); |
388 } while ((verts = iter.next())); | 388 } while ((verts = iter.next())); |
389 } | 389 } |
OLD | NEW |