| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 #include "GrContext.h" | 9 #include "GrContext.h" |
| 10 | 10 |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 vertex[4].set(rect.fLeft, rect.fTop); | 788 vertex[4].set(rect.fLeft, rect.fTop); |
| 789 } | 789 } |
| 790 | 790 |
| 791 target->drawNonIndexed(&drawState, gp, primType, 0, vertCount); | 791 target->drawNonIndexed(&drawState, gp, primType, 0, vertCount); |
| 792 } else { | 792 } else { |
| 793 // filled BW rect | 793 // filled BW rect |
| 794 target->drawSimpleRect(&drawState, color, rect); | 794 target->drawSimpleRect(&drawState, color, rect); |
| 795 } | 795 } |
| 796 } | 796 } |
| 797 | 797 |
| 798 void GrContext::drawRectToRect(const GrPaint& paint, | 798 void GrContext::drawNonAARectToRect(const GrPaint& paint, |
| 799 const SkMatrix& viewMatrix, | 799 const SkMatrix& viewMatrix, |
| 800 const SkRect& dstRect, | 800 const SkRect& rectToDraw, |
| 801 const SkRect& localRect) { | 801 const SkRect& localRect, |
| 802 const SkMatrix* localMatrix) { |
| 802 AutoCheckFlush acf(this); | 803 AutoCheckFlush acf(this); |
| 803 GrDrawState drawState; | 804 GrDrawState drawState; |
| 804 GrDrawTarget* target = this->prepareToDraw(&drawState, &paint, &viewMatrix,
&acf); | 805 GrDrawTarget* target = this->prepareToDraw(&drawState, &paint, &viewMatrix,
&acf); |
| 805 if (NULL == target) { | 806 if (NULL == target) { |
| 806 return; | 807 return; |
| 807 } | 808 } |
| 808 | 809 |
| 809 GR_CREATE_TRACE_MARKER("GrContext::drawRectToRect", target); | 810 GR_CREATE_TRACE_MARKER("GrContext::drawRectToRect", target); |
| 810 | 811 |
| 811 target->drawRect(&drawState, paint.getColor(), dstRect, &localRect, NULL); | 812 target->drawRect(&drawState, paint.getColor(), rectToDraw, &localRect, local
Matrix); |
| 812 } | 813 } |
| 813 | 814 |
| 814 static const GrGeometryProcessor* set_vertex_attributes(const SkPoint* texCoords
, | 815 static const GrGeometryProcessor* set_vertex_attributes(const SkPoint* texCoords
, |
| 815 const GrColor* colors, | 816 const GrColor* colors, |
| 816 int* colorOffset, | 817 int* colorOffset, |
| 817 int* texOffset, | 818 int* texOffset, |
| 818 GrColor color) { | 819 GrColor color) { |
| 819 *texOffset = -1; | 820 *texOffset = -1; |
| 820 *colorOffset = -1; | 821 *colorOffset = -1; |
| 821 uint32_t flags = GrDefaultGeoProcFactory::kPosition_GPType; | 822 uint32_t flags = GrDefaultGeoProcFactory::kPosition_GPType; |
| (...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1735 fResourceCache2->printStats(); | 1736 fResourceCache2->printStats(); |
| 1736 } | 1737 } |
| 1737 #endif | 1738 #endif |
| 1738 | 1739 |
| 1739 #if GR_GPU_STATS | 1740 #if GR_GPU_STATS |
| 1740 const GrContext::GPUStats* GrContext::gpuStats() const { | 1741 const GrContext::GPUStats* GrContext::gpuStats() const { |
| 1741 return fGpu->gpuStats(); | 1742 return fGpu->gpuStats(); |
| 1742 } | 1743 } |
| 1743 #endif | 1744 #endif |
| 1744 | 1745 |
| OLD | NEW |