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 "GrBlurUtils.h" | 10 #include "GrBlurUtils.h" |
(...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1671 ASSERT_SINGLE_OWNER | 1671 ASSERT_SINGLE_OWNER |
1672 if (paint.isAntiAlias()) { | 1672 if (paint.isAntiAlias()) { |
1673 this->INHERITED::drawAtlas(draw, atlas, xform, texRect, colors, count, m
ode, paint); | 1673 this->INHERITED::drawAtlas(draw, atlas, xform, texRect, colors, count, m
ode, paint); |
1674 return; | 1674 return; |
1675 } | 1675 } |
1676 | 1676 |
1677 CHECK_SHOULD_DRAW(draw); | 1677 CHECK_SHOULD_DRAW(draw); |
1678 GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawText", fContext); | 1678 GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawText", fContext); |
1679 | 1679 |
1680 SkPaint p(paint); | 1680 SkPaint p(paint); |
1681 p.setShader(atlas->newShader(SkShader::kClamp_TileMode, SkShader::kClamp_Til
eMode))->unref(); | 1681 p.setShader(atlas->makeShader(SkShader::kClamp_TileMode, SkShader::kClamp_Ti
leMode)); |
1682 | 1682 |
1683 GrPaint grPaint; | 1683 GrPaint grPaint; |
1684 if (colors) { | 1684 if (colors) { |
1685 if (!SkPaintToGrPaintWithXfermode(this->context(), p, *draw.fMatrix, mod
e, true, | 1685 if (!SkPaintToGrPaintWithXfermode(this->context(), p, *draw.fMatrix, mod
e, true, |
1686 &grPaint)) { | 1686 &grPaint)) { |
1687 return; | 1687 return; |
1688 } | 1688 } |
1689 } else { | 1689 } else { |
1690 if (!SkPaintToGrPaint(this->context(), p, *draw.fMatrix, &grPaint)) { | 1690 if (!SkPaintToGrPaint(this->context(), p, *draw.fMatrix, &grPaint)) { |
1691 return; | 1691 return; |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1878 } | 1878 } |
1879 | 1879 |
1880 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1880 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
1881 ASSERT_SINGLE_OWNER | 1881 ASSERT_SINGLE_OWNER |
1882 // We always return a transient cache, so it is freed after each | 1882 // We always return a transient cache, so it is freed after each |
1883 // filter traversal. | 1883 // filter traversal. |
1884 return SkGpuDevice::NewImageFilterCache(); | 1884 return SkGpuDevice::NewImageFilterCache(); |
1885 } | 1885 } |
1886 | 1886 |
1887 #endif | 1887 #endif |
OLD | NEW |