OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkGpuDevice.h" | 8 #include "SkGpuDevice.h" |
9 | 9 |
10 #include "effects/GrBicubicEffect.h" | 10 #include "effects/GrBicubicEffect.h" |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 } | 602 } |
603 | 603 |
604 GrPaint grPaint; | 604 GrPaint grPaint; |
605 if (!skPaint2GrPaintShader(this, paint, true, &grPaint)) { | 605 if (!skPaint2GrPaintShader(this, paint, true, &grPaint)) { |
606 return; | 606 return; |
607 } | 607 } |
608 | 608 |
609 fContext->drawVertices(grPaint, | 609 fContext->drawVertices(grPaint, |
610 gPointMode2PrimtiveType[mode], | 610 gPointMode2PrimtiveType[mode], |
611 SkToS32(count), | 611 SkToS32(count), |
612 (GrPoint*)pts, | 612 (SkPoint*)pts, |
613 NULL, | 613 NULL, |
614 NULL, | 614 NULL, |
615 NULL, | 615 NULL, |
616 0); | 616 0); |
617 } | 617 } |
618 | 618 |
619 /////////////////////////////////////////////////////////////////////////////// | 619 /////////////////////////////////////////////////////////////////////////////// |
620 | 620 |
621 void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect, | 621 void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect, |
622 const SkPaint& paint) { | 622 const SkPaint& paint) { |
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1790 // need to convert byte order and from non-PM to PM | 1790 // need to convert byte order and from non-PM to PM |
1791 convertedColors.reset(vertexCount); | 1791 convertedColors.reset(vertexCount); |
1792 for (int i = 0; i < vertexCount; ++i) { | 1792 for (int i = 0; i < vertexCount; ++i) { |
1793 convertedColors[i] = SkColor2GrColor(colors[i]); | 1793 convertedColors[i] = SkColor2GrColor(colors[i]); |
1794 } | 1794 } |
1795 colors = convertedColors.get(); | 1795 colors = convertedColors.get(); |
1796 } | 1796 } |
1797 fContext->drawVertices(grPaint, | 1797 fContext->drawVertices(grPaint, |
1798 gVertexMode2PrimitiveType[vmode], | 1798 gVertexMode2PrimitiveType[vmode], |
1799 vertexCount, | 1799 vertexCount, |
1800 (GrPoint*) vertices, | 1800 vertices, |
1801 (GrPoint*) texs, | 1801 texs, |
1802 colors, | 1802 colors, |
1803 indices, | 1803 indices, |
1804 indexCount); | 1804 indexCount); |
1805 } | 1805 } |
1806 | 1806 |
1807 /////////////////////////////////////////////////////////////////////////////// | 1807 /////////////////////////////////////////////////////////////////////////////// |
1808 | 1808 |
1809 void SkGpuDevice::drawText(const SkDraw& draw, const void* text, | 1809 void SkGpuDevice::drawText(const SkDraw& draw, const void* text, |
1810 size_t byteLength, SkScalar x, SkScalar y, | 1810 size_t byteLength, SkScalar x, SkScalar y, |
1811 const SkPaint& paint) { | 1811 const SkPaint& paint) { |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1977 if (NULL == data) { | 1977 if (NULL == data) { |
1978 return false; | 1978 return false; |
1979 } | 1979 } |
1980 | 1980 |
1981 #if 0 | 1981 #if 0 |
1982 const GPUAccelData *gpuData = static_cast<const GPUAccelData*>(data); | 1982 const GPUAccelData *gpuData = static_cast<const GPUAccelData*>(data); |
1983 #endif | 1983 #endif |
1984 | 1984 |
1985 return false; | 1985 return false; |
1986 } | 1986 } |
OLD | NEW |