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

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

Issue 302053002: Revert of setConfig -> setInfo (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrPictureUtils.cpp ('k') | src/image/SkImagePriv.h » ('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 "effects/GrBicubicEffect.h" 10 #include "effects/GrBicubicEffect.h"
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 am.set(context, translate); 731 am.set(context, translate);
732 context->drawPath(tempPaint, devPath, stroke); 732 context->drawPath(tempPaint, devPath, stroke);
733 return true; 733 return true;
734 } 734 }
735 735
736 SkBitmap wrap_texture(GrTexture* texture) { 736 SkBitmap wrap_texture(GrTexture* texture) {
737 SkImageInfo info; 737 SkImageInfo info;
738 texture->asImageInfo(&info); 738 texture->asImageInfo(&info);
739 739
740 SkBitmap result; 740 SkBitmap result;
741 result.setInfo(info); 741 result.setConfig(info);
742 result.setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, texture)))->unref(); 742 result.setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, texture)))->unref();
743 return result; 743 return result;
744 } 744 }
745 745
746 }; 746 };
747 747
748 void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath, 748 void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath,
749 const SkPaint& paint, const SkMatrix* prePathMatrix, 749 const SkPaint& paint, const SkMatrix* prePathMatrix,
750 bool pathIsMutable) { 750 bool pathIsMutable) {
751 CHECK_FOR_ANNOTATION(paint); 751 CHECK_FOR_ANNOTATION(paint);
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 1811
1812 SkAutoTUnref<GPUAccelData> data(SkNEW_ARGS(GPUAccelData, (key))); 1812 SkAutoTUnref<GPUAccelData> data(SkNEW_ARGS(GPUAccelData, (key)));
1813 1813
1814 picture->EXPERIMENTAL_addAccelData(data); 1814 picture->EXPERIMENTAL_addAccelData(data);
1815 1815
1816 GatherGPUInfo(picture, data); 1816 GatherGPUInfo(picture, data);
1817 } 1817 }
1818 1818
1819 static void wrap_texture(GrTexture* texture, int width, int height, SkBitmap* re sult) { 1819 static void wrap_texture(GrTexture* texture, int width, int height, SkBitmap* re sult) {
1820 SkImageInfo info = SkImageInfo::MakeN32Premul(width, height); 1820 SkImageInfo info = SkImageInfo::MakeN32Premul(width, height);
1821 result->setInfo(info); 1821 result->setConfig(info);
1822 result->setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, texture)))->unref(); 1822 result->setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, texture)))->unref();
1823 } 1823 }
1824 1824
1825 void SkGpuDevice::EXPERIMENTAL_purge(SkPicture* picture) { 1825 void SkGpuDevice::EXPERIMENTAL_purge(SkPicture* picture) {
1826 1826
1827 } 1827 }
1828 1828
1829 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* canvas, SkPicture* picture) { 1829 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* canvas, SkPicture* picture) {
1830 1830
1831 SkPicture::AccelData::Key key = GPUAccelData::ComputeAccelDataKey(); 1831 SkPicture::AccelData::Key key = GPUAccelData::ComputeAccelDataKey();
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1991 GrCachedLayer* layer = fContext->getLayerCache()->findLayerOrCreate(pict ure, i); 1991 GrCachedLayer* layer = fContext->getLayerCache()->findLayerOrCreate(pict ure, i);
1992 1992
1993 if (NULL != layer->getTexture()) { 1993 if (NULL != layer->getTexture()) {
1994 fContext->unlockScratchTexture(layer->getTexture()); 1994 fContext->unlockScratchTexture(layer->getTexture());
1995 layer->setTexture(NULL); 1995 layer->setTexture(NULL);
1996 } 1996 }
1997 } 1997 }
1998 1998
1999 return true; 1999 return true;
2000 } 2000 }
OLDNEW
« no previous file with comments | « src/gpu/GrPictureUtils.cpp ('k') | src/image/SkImagePriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698