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

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

Issue 1130283004: Revert of Sketch splitting SkPicture into an interface and SkBigPicture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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/gpu/SkGpuDevice.h ('k') | src/utils/SkPictureUtils.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 "GrContext.h" 10 #include "GrContext.h"
(...skipping 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after
1992 } 1992 }
1993 1993
1994 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture * mainPicture, 1994 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture * mainPicture,
1995 const SkMatrix* matrix, const SkPaint * paint) { 1995 const SkMatrix* matrix, const SkPaint * paint) {
1996 #ifndef SK_IGNORE_GPU_LAYER_HOISTING 1996 #ifndef SK_IGNORE_GPU_LAYER_HOISTING
1997 // todo: should handle this natively 1997 // todo: should handle this natively
1998 if (paint) { 1998 if (paint) {
1999 return false; 1999 return false;
2000 } 2000 }
2001 2001
2002 const SkBigPicture::AccelData* data = NULL; 2002 SkPicture::AccelData::Key key = SkLayerInfo::ComputeKey();
2003 if (const SkBigPicture* bp = mainPicture->asSkBigPicture()) { 2003
2004 data = bp->accelData(); 2004 const SkPicture::AccelData* data = mainPicture->EXPERIMENTAL_getAccelData(ke y);
2005 }
2006 if (!data) { 2005 if (!data) {
2007 return false; 2006 return false;
2008 } 2007 }
2009 2008
2010 const SkLayerInfo *gpuData = static_cast<const SkLayerInfo*>(data); 2009 const SkLayerInfo *gpuData = static_cast<const SkLayerInfo*>(data);
2011 if (0 == gpuData->numBlocks()) { 2010 if (0 == gpuData->numBlocks()) {
2012 return false; 2011 return false;
2013 } 2012 }
2014 2013
2015 SkTDArray<GrHoistedLayer> atlasedNeedRendering, atlasedRecycled; 2014 SkTDArray<GrHoistedLayer> atlasedNeedRendering, atlasedRecycled;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 #endif 2057 #endif
2059 } 2058 }
2060 2059
2061 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 2060 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
2062 // We always return a transient cache, so it is freed after each 2061 // We always return a transient cache, so it is freed after each
2063 // filter traversal. 2062 // filter traversal.
2064 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 2063 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
2065 } 2064 }
2066 2065
2067 #endif 2066 #endif
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.h ('k') | src/utils/SkPictureUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698