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

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

Issue 1763143002: WIP RasterCanvasLayerAllocator (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add allocator-constancy sanitycheck Created 4 years, 9 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 "GrBlurUtils.h" 10 #include "GrBlurUtils.h"
(...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after
1759 } 1759 }
1760 1760
1761 void SkGpuDevice::flush() { 1761 void SkGpuDevice::flush() {
1762 ASSERT_SINGLE_OWNER 1762 ASSERT_SINGLE_OWNER
1763 1763
1764 fRenderTarget->prepareForExternalIO(); 1764 fRenderTarget->prepareForExternalIO();
1765 } 1765 }
1766 1766
1767 /////////////////////////////////////////////////////////////////////////////// 1767 ///////////////////////////////////////////////////////////////////////////////
1768 1768
1769 SkBaseDevice* SkGpuDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint *) { 1769 SkBaseDevice* SkGpuDevice::onCreateDevice(const SkBaseDevice::CreateInfo& cinfo,
1770 const SkPaint*,
1771 SkRasterCanvasLayerAllocator*) {
1770 ASSERT_SINGLE_OWNER 1772 ASSERT_SINGLE_OWNER
1771 GrSurfaceDesc desc; 1773 GrSurfaceDesc desc;
1772 desc.fConfig = fRenderTarget->config(); 1774 desc.fConfig = fRenderTarget->config();
1773 desc.fFlags = kRenderTarget_GrSurfaceFlag; 1775 desc.fFlags = kRenderTarget_GrSurfaceFlag;
1774 desc.fWidth = cinfo.fInfo.width(); 1776 desc.fWidth = cinfo.fInfo.width();
1775 desc.fHeight = cinfo.fInfo.height(); 1777 desc.fHeight = cinfo.fInfo.height();
1776 desc.fSampleCnt = fRenderTarget->desc().fSampleCnt; 1778 desc.fSampleCnt = fRenderTarget->desc().fSampleCnt;
1777 1779
1778 SkAutoTUnref<GrTexture> texture; 1780 SkAutoTUnref<GrTexture> texture;
1779 // Skia's convention is to only clear a device if it is non-opaque. 1781 // Skia's convention is to only clear a device if it is non-opaque.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1883 } 1885 }
1884 1886
1885 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 1887 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
1886 ASSERT_SINGLE_OWNER 1888 ASSERT_SINGLE_OWNER
1887 // We always return a transient cache, so it is freed after each 1889 // We always return a transient cache, so it is freed after each
1888 // filter traversal. 1890 // filter traversal.
1889 return SkGpuDevice::NewImageFilterCache(); 1891 return SkGpuDevice::NewImageFilterCache();
1890 } 1892 }
1891 1893
1892 #endif 1894 #endif
OLDNEW
« src/core/SkCanvas.cpp ('K') | « src/gpu/SkGpuDevice.h ('k') | src/pdf/SkPDFDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698