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

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: nullptr 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
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 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 } 1973 }
1974 1974
1975 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture * mainPicture, 1975 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture * mainPicture,
1976 const SkMatrix* matrix, const SkPaint * paint) { 1976 const SkMatrix* matrix, const SkPaint * paint) {
1977 #ifndef SK_IGNORE_GPU_LAYER_HOISTING 1977 #ifndef SK_IGNORE_GPU_LAYER_HOISTING
1978 // todo: should handle this natively 1978 // todo: should handle this natively
1979 if (paint) { 1979 if (paint) {
1980 return false; 1980 return false;
1981 } 1981 }
1982 1982
1983 SkPicture::AccelData::Key key = SkLayerInfo::ComputeKey(); 1983 const SkBigPicture::AccelData* data = NULL;
1984 1984 if (const SkBigPicture* bp = mainPicture->asSkBigPicture()) {
1985 const SkPicture::AccelData* data = mainPicture->EXPERIMENTAL_getAccelData(ke y); 1985 data = bp->accelData();
1986 }
1986 if (!data) { 1987 if (!data) {
1987 return false; 1988 return false;
1988 } 1989 }
1989 1990
1990 const SkLayerInfo *gpuData = static_cast<const SkLayerInfo*>(data); 1991 const SkLayerInfo *gpuData = static_cast<const SkLayerInfo*>(data);
1991 if (0 == gpuData->numBlocks()) { 1992 if (0 == gpuData->numBlocks()) {
1992 return false; 1993 return false;
1993 } 1994 }
1994 1995
1995 SkTDArray<GrHoistedLayer> atlasedNeedRendering, atlasedRecycled; 1996 SkTDArray<GrHoistedLayer> atlasedNeedRendering, atlasedRecycled;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2038 #endif 2039 #endif
2039 } 2040 }
2040 2041
2041 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 2042 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
2042 // We always return a transient cache, so it is freed after each 2043 // We always return a transient cache, so it is freed after each
2043 // filter traversal. 2044 // filter traversal.
2044 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 2045 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
2045 } 2046 }
2046 2047
2047 #endif 2048 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698