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

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

Issue 1962603002: Reland of Disable layer hoisting for non-8888 canvases (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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/core/SkMultiPictureDraw.cpp ('k') | no next file » | 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 "GrBlurUtils.h" 10 #include "GrBlurUtils.h"
(...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after
1775 static const SkBudgeted kBudgeted = SkBudgeted::kNo; 1775 static const SkBudgeted kBudgeted = SkBudgeted::kNo;
1776 return SkSurface::MakeRenderTarget(fContext, kBudgeted, info, fRenderTarget- >desc().fSampleCnt, 1776 return SkSurface::MakeRenderTarget(fContext, kBudgeted, info, fRenderTarget- >desc().fSampleCnt,
1777 &props); 1777 &props);
1778 } 1778 }
1779 1779
1780 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture * mainPicture, 1780 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture * mainPicture,
1781 const SkMatrix* matrix, const SkPaint * paint) { 1781 const SkMatrix* matrix, const SkPaint * paint) {
1782 ASSERT_SINGLE_OWNER 1782 ASSERT_SINGLE_OWNER
1783 #ifndef SK_IGNORE_GPU_LAYER_HOISTING 1783 #ifndef SK_IGNORE_GPU_LAYER_HOISTING
1784 // todo: should handle this natively 1784 // todo: should handle this natively
1785 if (paint) { 1785 if (paint ||
1786 (kRGBA_8888_SkColorType != mainCanvas->imageInfo().colorType() &&
1787 kBGRA_8888_SkColorType != mainCanvas->imageInfo().colorType())) {
1786 return false; 1788 return false;
1787 } 1789 }
1788 1790
1789 const SkBigPicture::AccelData* data = nullptr; 1791 const SkBigPicture::AccelData* data = nullptr;
1790 if (const SkBigPicture* bp = mainPicture->asSkBigPicture()) { 1792 if (const SkBigPicture* bp = mainPicture->asSkBigPicture()) {
1791 data = bp->accelData(); 1793 data = bp->accelData();
1792 } 1794 }
1793 if (!data) { 1795 if (!data) {
1794 return false; 1796 return false;
1795 } 1797 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1849 } 1851 }
1850 1852
1851 SkImageFilterCache* SkGpuDevice::getImageFilterCache() { 1853 SkImageFilterCache* SkGpuDevice::getImageFilterCache() {
1852 ASSERT_SINGLE_OWNER 1854 ASSERT_SINGLE_OWNER
1853 // We always return a transient cache, so it is freed after each 1855 // We always return a transient cache, so it is freed after each
1854 // filter traversal. 1856 // filter traversal.
1855 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize); 1857 return SkImageFilterCache::Create(kDefaultImageFilterCacheSize);
1856 } 1858 }
1857 1859
1858 #endif 1860 #endif
OLDNEW
« no previous file with comments | « src/core/SkMultiPictureDraw.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698