| 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 | 10 | 
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 689     if (hasUVs) { | 689     if (hasUVs) { | 
| 690         drawState->setVertexAttribs<gBWRectPosUVAttribs>(2); | 690         drawState->setVertexAttribs<gBWRectPosUVAttribs>(2); | 
| 691     } else { | 691     } else { | 
| 692         drawState->setVertexAttribs<gBWRectPosUVAttribs>(1); | 692         drawState->setVertexAttribs<gBWRectPosUVAttribs>(1); | 
| 693     } | 693     } | 
| 694 } | 694 } | 
| 695 | 695 | 
| 696 }; | 696 }; | 
| 697 | 697 | 
| 698 void GrDrawTarget::onDrawRect(const SkRect& rect, | 698 void GrDrawTarget::onDrawRect(const SkRect& rect, | 
| 699                               const SkMatrix* matrix, |  | 
| 700                               const SkRect* localRect, | 699                               const SkRect* localRect, | 
| 701                               const SkMatrix* localMatrix) { | 700                               const SkMatrix* localMatrix) { | 
| 702 | 701 | 
| 703     GrDrawState::AutoViewMatrixRestore avmr; |  | 
| 704     if (NULL != matrix) { |  | 
| 705         avmr.set(this->drawState(), *matrix); |  | 
| 706     } |  | 
| 707 |  | 
| 708     set_vertex_attributes(this->drawState(), NULL != localRect); | 702     set_vertex_attributes(this->drawState(), NULL != localRect); | 
| 709 | 703 | 
| 710     AutoReleaseGeometry geo(this, 4, 0); | 704     AutoReleaseGeometry geo(this, 4, 0); | 
| 711     if (!geo.succeeded()) { | 705     if (!geo.succeeded()) { | 
| 712         GrPrintf("Failed to get space for vertices!\n"); | 706         GrPrintf("Failed to get space for vertices!\n"); | 
| 713         return; | 707         return; | 
| 714     } | 708     } | 
| 715 | 709 | 
| 716     size_t vsize = this->drawState()->getVertexSize(); | 710     size_t vsize = this->drawState()->getVertexSize(); | 
| 717     geo.positions()->setRectFan(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom
      , vsize); | 711     geo.positions()->setRectFan(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom
      , vsize); | 
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1152     SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); | 1146     SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); | 
| 1153 | 1147 | 
| 1154     for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i)  { | 1148     for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i)  { | 
| 1155         r.appendf("%s is uploadable to a texture: %s\n", | 1149         r.appendf("%s is uploadable to a texture: %s\n", | 
| 1156                   kConfigNames[i], | 1150                   kConfigNames[i], | 
| 1157                   gNY[fConfigTextureSupport[i]]); | 1151                   gNY[fConfigTextureSupport[i]]); | 
| 1158     } | 1152     } | 
| 1159 | 1153 | 
| 1160     return r; | 1154     return r; | 
| 1161 } | 1155 } | 
| OLD | NEW | 
|---|