| 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 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1763 | 1763 |
| 1764 GrTexture* texture; | 1764 GrTexture* texture; |
| 1765 // We assume here that the filter will not attempt to tile the src. Otherwis
e, this cache lookup | 1765 // We assume here that the filter will not attempt to tile the src. Otherwis
e, this cache lookup |
| 1766 // must be pushed upstack. | 1766 // must be pushed upstack. |
| 1767 SkAutoCachedTexture act(this, src, NULL, &texture); | 1767 SkAutoCachedTexture act(this, src, NULL, &texture); |
| 1768 | 1768 |
| 1769 return filter_texture(this, fContext, texture, filter, src.width(), src.heig
ht(), ctm, result, | 1769 return filter_texture(this, fContext, texture, filter, src.width(), src.heig
ht(), ctm, result, |
| 1770 offset); | 1770 offset); |
| 1771 } | 1771 } |
| 1772 | 1772 |
| 1773 void SkGpuDevice::internalPrivate_PreLoad(const SkBitmap& bitmap, const SkIRect&
rect) { |
| 1774 // TODO: load bitmap into VRAM |
| 1775 } |
| 1776 |
| 1773 /////////////////////////////////////////////////////////////////////////////// | 1777 /////////////////////////////////////////////////////////////////////////////// |
| 1774 | 1778 |
| 1775 // must be in SkCanvas::VertexMode order | 1779 // must be in SkCanvas::VertexMode order |
| 1776 static const GrPrimitiveType gVertexMode2PrimitiveType[] = { | 1780 static const GrPrimitiveType gVertexMode2PrimitiveType[] = { |
| 1777 kTriangles_GrPrimitiveType, | 1781 kTriangles_GrPrimitiveType, |
| 1778 kTriangleStrip_GrPrimitiveType, | 1782 kTriangleStrip_GrPrimitiveType, |
| 1779 kTriangleFan_GrPrimitiveType, | 1783 kTriangleFan_GrPrimitiveType, |
| 1780 }; | 1784 }; |
| 1781 | 1785 |
| 1782 void SkGpuDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode, | 1786 void SkGpuDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode, |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1970 GrTexture* texture, | 1974 GrTexture* texture, |
| 1971 bool needClear) | 1975 bool needClear) |
| 1972 : SkBitmapDevice(make_bitmap(context, texture->asRenderTarget())) { | 1976 : SkBitmapDevice(make_bitmap(context, texture->asRenderTarget())) { |
| 1973 | 1977 |
| 1974 SkASSERT(texture && texture->asRenderTarget()); | 1978 SkASSERT(texture && texture->asRenderTarget()); |
| 1975 // This constructor is called from onCreateDevice. It has locked the RT in t
he texture | 1979 // This constructor is called from onCreateDevice. It has locked the RT in t
he texture |
| 1976 // cache. We pass true for the third argument so that it will get unlocked. | 1980 // cache. We pass true for the third argument so that it will get unlocked. |
| 1977 this->initFromRenderTarget(context, texture->asRenderTarget(), true); | 1981 this->initFromRenderTarget(context, texture->asRenderTarget(), true); |
| 1978 fNeedClear = needClear; | 1982 fNeedClear = needClear; |
| 1979 } | 1983 } |
| OLD | NEW |