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

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

Issue 1112523006: Sketch splitting SkPicture into an interface and SkBigPicture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: note 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 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 } 1989 }
1990 1990
1991 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture * mainPicture, 1991 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture * mainPicture,
1992 const SkMatrix* matrix, const SkPaint * paint) { 1992 const SkMatrix* matrix, const SkPaint * paint) {
1993 #ifndef SK_IGNORE_GPU_LAYER_HOISTING 1993 #ifndef SK_IGNORE_GPU_LAYER_HOISTING
1994 // todo: should handle this natively 1994 // todo: should handle this natively
1995 if (paint) { 1995 if (paint) {
1996 return false; 1996 return false;
1997 } 1997 }
1998 1998
1999 SkPicture::AccelData::Key key = SkLayerInfo::ComputeKey(); 1999 const SkBigPicture::AccelData* data = NULL;
2000 2000 if (const SkBigPicture* bp = mainPicture->asSkBigPicture()) {
2001 const SkPicture::AccelData* data = mainPicture->EXPERIMENTAL_getAccelData(ke y); 2001 data = bp->accelData();
2002 }
2002 if (!data) { 2003 if (!data) {
2003 return false; 2004 return false;
2004 } 2005 }
2005 2006
2006 const SkLayerInfo *gpuData = static_cast<const SkLayerInfo*>(data); 2007 const SkLayerInfo *gpuData = static_cast<const SkLayerInfo*>(data);
2007 if (0 == gpuData->numBlocks()) { 2008 if (0 == gpuData->numBlocks()) {
2008 return false; 2009 return false;
2009 } 2010 }
2010 2011
2011 SkTDArray<GrHoistedLayer> atlasedNeedRendering, atlasedRecycled; 2012 SkTDArray<GrHoistedLayer> atlasedNeedRendering, atlasedRecycled;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2054 #endif 2055 #endif
2055 } 2056 }
2056 2057
2057 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 2058 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
2058 // We always return a transient cache, so it is freed after each 2059 // We always return a transient cache, so it is freed after each
2059 // filter traversal. 2060 // filter traversal.
2060 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 2061 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
2061 } 2062 }
2062 2063
2063 #endif 2064 #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