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

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: check on all ops 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 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
2007 } 2007 }
2008 2008
2009 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture * mainPicture, 2009 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture * mainPicture,
2010 const SkMatrix* matrix, const SkPaint * paint) { 2010 const SkMatrix* matrix, const SkPaint * paint) {
2011 #ifndef SK_IGNORE_GPU_LAYER_HOISTING 2011 #ifndef SK_IGNORE_GPU_LAYER_HOISTING
2012 // todo: should handle this natively 2012 // todo: should handle this natively
2013 if (paint) { 2013 if (paint) {
2014 return false; 2014 return false;
2015 } 2015 }
2016 2016
2017 SkPicture::AccelData::Key key = SkLayerInfo::ComputeKey(); 2017 const SkBigPicture::AccelData* data = NULL;
2018 2018 if (const SkBigPicture* bp = mainPicture->asSkBigPicture()) {
2019 const SkPicture::AccelData* data = mainPicture->EXPERIMENTAL_getAccelData(ke y); 2019 data = bp->accelData();
2020 }
2020 if (!data) { 2021 if (!data) {
2021 return false; 2022 return false;
2022 } 2023 }
2023 2024
2024 const SkLayerInfo *gpuData = static_cast<const SkLayerInfo*>(data); 2025 const SkLayerInfo *gpuData = static_cast<const SkLayerInfo*>(data);
2025 if (0 == gpuData->numBlocks()) { 2026 if (0 == gpuData->numBlocks()) {
2026 return false; 2027 return false;
2027 } 2028 }
2028 2029
2029 SkTDArray<GrHoistedLayer> atlasedNeedRendering, atlasedRecycled; 2030 SkTDArray<GrHoistedLayer> atlasedNeedRendering, atlasedRecycled;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
2072 #endif 2073 #endif
2073 } 2074 }
2074 2075
2075 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 2076 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
2076 // We always return a transient cache, so it is freed after each 2077 // We always return a transient cache, so it is freed after each
2077 // filter traversal. 2078 // filter traversal.
2078 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 2079 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
2079 } 2080 }
2080 2081
2081 #endif 2082 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698