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

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

Issue 301283003: Revert "Revert of setConfig -> setInfo (https://codereview.chromium.org/308683005/)" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add guard for android 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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 am.set(context, translate); 732 am.set(context, translate);
733 context->drawPath(tempPaint, devPath, stroke); 733 context->drawPath(tempPaint, devPath, stroke);
734 return true; 734 return true;
735 } 735 }
736 736
737 SkBitmap wrap_texture(GrTexture* texture) { 737 SkBitmap wrap_texture(GrTexture* texture) {
738 SkImageInfo info; 738 SkImageInfo info;
739 texture->asImageInfo(&info); 739 texture->asImageInfo(&info);
740 740
741 SkBitmap result; 741 SkBitmap result;
742 result.setConfig(info); 742 result.setInfo(info);
743 result.setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, texture)))->unref(); 743 result.setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, texture)))->unref();
744 return result; 744 return result;
745 } 745 }
746 746
747 }; 747 };
748 748
749 void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath, 749 void SkGpuDevice::drawPath(const SkDraw& draw, const SkPath& origSrcPath,
750 const SkPaint& paint, const SkMatrix* prePathMatrix, 750 const SkPaint& paint, const SkMatrix* prePathMatrix,
751 bool pathIsMutable) { 751 bool pathIsMutable) {
752 CHECK_FOR_ANNOTATION(paint); 752 CHECK_FOR_ANNOTATION(paint);
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
1837 1837
1838 SkAutoTUnref<GPUAccelData> data(SkNEW_ARGS(GPUAccelData, (key))); 1838 SkAutoTUnref<GPUAccelData> data(SkNEW_ARGS(GPUAccelData, (key)));
1839 1839
1840 picture->EXPERIMENTAL_addAccelData(data); 1840 picture->EXPERIMENTAL_addAccelData(data);
1841 1841
1842 GatherGPUInfo(picture, data); 1842 GatherGPUInfo(picture, data);
1843 } 1843 }
1844 1844
1845 static void wrap_texture(GrTexture* texture, int width, int height, SkBitmap* re sult) { 1845 static void wrap_texture(GrTexture* texture, int width, int height, SkBitmap* re sult) {
1846 SkImageInfo info = SkImageInfo::MakeN32Premul(width, height); 1846 SkImageInfo info = SkImageInfo::MakeN32Premul(width, height);
1847 result->setConfig(info); 1847 result->setInfo(info);
1848 result->setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, texture)))->unref(); 1848 result->setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, texture)))->unref();
1849 } 1849 }
1850 1850
1851 void SkGpuDevice::EXPERIMENTAL_purge(SkPicture* picture) { 1851 void SkGpuDevice::EXPERIMENTAL_purge(SkPicture* picture) {
1852 1852
1853 } 1853 }
1854 1854
1855 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* canvas, SkPicture* picture) { 1855 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* canvas, SkPicture* picture) {
1856 1856
1857 SkPicture::AccelData::Key key = GPUAccelData::ComputeAccelDataKey(); 1857 SkPicture::AccelData::Key key = GPUAccelData::ComputeAccelDataKey();
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 GrCachedLayer* layer = fContext->getLayerCache()->findLayerOrCreate(pict ure, i); 2017 GrCachedLayer* layer = fContext->getLayerCache()->findLayerOrCreate(pict ure, i);
2018 2018
2019 if (NULL != layer->getTexture()) { 2019 if (NULL != layer->getTexture()) {
2020 fContext->unlockScratchTexture(layer->getTexture()); 2020 fContext->unlockScratchTexture(layer->getTexture());
2021 layer->setTexture(NULL); 2021 layer->setTexture(NULL);
2022 } 2022 }
2023 } 2023 }
2024 2024
2025 return true; 2025 return true;
2026 } 2026 }
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