Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: src/gpu/SkGpuDevice.cpp

Issue 1785473002: SkImage now has makeShader to return sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use build guard for impl of newShader Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkPictureShader.cpp ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/core/SkPictureShader.cpp ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698