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/GrTextureDomainEffect.h" | 10 #include "effects/GrTextureDomainEffect.h" |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 return; | 564 return; |
565 } | 565 } |
566 | 566 |
567 GrPaint grPaint; | 567 GrPaint grPaint; |
568 if (!skPaint2GrPaintShader(this, paint, true, &grPaint)) { | 568 if (!skPaint2GrPaintShader(this, paint, true, &grPaint)) { |
569 return; | 569 return; |
570 } | 570 } |
571 | 571 |
572 fContext->drawVertices(grPaint, | 572 fContext->drawVertices(grPaint, |
573 gPointMode2PrimtiveType[mode], | 573 gPointMode2PrimtiveType[mode], |
574 count, | 574 SkToS32(count), |
575 (GrPoint*)pts, | 575 (GrPoint*)pts, |
576 NULL, | 576 NULL, |
577 NULL, | 577 NULL, |
578 NULL, | 578 NULL, |
579 0); | 579 0); |
580 } | 580 } |
581 | 581 |
582 /////////////////////////////////////////////////////////////////////////////// | 582 /////////////////////////////////////////////////////////////////////////////// |
583 | 583 |
584 void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect, | 584 void SkGpuDevice::drawRect(const SkDraw& draw, const SkRect& rect, |
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1843 GrTexture* texture, | 1843 GrTexture* texture, |
1844 bool needClear) | 1844 bool needClear) |
1845 : SkBitmapDevice(make_bitmap(context, texture->asRenderTarget())) { | 1845 : SkBitmapDevice(make_bitmap(context, texture->asRenderTarget())) { |
1846 | 1846 |
1847 SkASSERT(texture && texture->asRenderTarget()); | 1847 SkASSERT(texture && texture->asRenderTarget()); |
1848 // This constructor is called from onCreateCompatibleDevice. It has locked t
he RT in the texture | 1848 // This constructor is called from onCreateCompatibleDevice. It has locked t
he RT in the texture |
1849 // cache. We pass true for the third argument so that it will get unlocked. | 1849 // cache. We pass true for the third argument so that it will get unlocked. |
1850 this->initFromRenderTarget(context, texture->asRenderTarget(), true); | 1850 this->initFromRenderTarget(context, texture->asRenderTarget(), true); |
1851 fNeedClear = needClear; | 1851 fNeedClear = needClear; |
1852 } | 1852 } |
OLD | NEW |