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

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

Issue 448793004: add drawPicture variant that takes a matrix and paint (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more dummies so we can land Created 6 years, 4 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/GrPictureUtils.cpp ('k') | src/pipe/SkGPipeWrite.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 "effects/GrBicubicEffect.h" 10 #include "effects/GrBicubicEffect.h"
(...skipping 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after
1865 1865
1866 fContext->getLayerCache()->trackPicture(picture); 1866 fContext->getLayerCache()->trackPicture(picture);
1867 } 1867 }
1868 1868
1869 static void wrap_texture(GrTexture* texture, int width, int height, SkBitmap* re sult) { 1869 static void wrap_texture(GrTexture* texture, int width, int height, SkBitmap* re sult) {
1870 SkImageInfo info = SkImageInfo::MakeN32Premul(width, height); 1870 SkImageInfo info = SkImageInfo::MakeN32Premul(width, height);
1871 result->setInfo(info); 1871 result->setInfo(info);
1872 result->setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, texture)))->unref(); 1872 result->setPixelRef(SkNEW_ARGS(SkGrPixelRef, (info, texture)))->unref();
1873 } 1873 }
1874 1874
1875 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture * picture) { 1875 bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture * picture,
1876 const SkMatrix* matrix, const SkPaint * paint) {
1877 // todo: should handle these natively
1878 if (matrix || paint) {
1879 return false;
1880 }
1881
1876 fContext->getLayerCache()->processDeletedPictures(); 1882 fContext->getLayerCache()->processDeletedPictures();
1877 1883
1878 SkPicture::AccelData::Key key = GPUAccelData::ComputeAccelDataKey(); 1884 SkPicture::AccelData::Key key = GPUAccelData::ComputeAccelDataKey();
1879 1885
1880 const SkPicture::AccelData* data = picture->EXPERIMENTAL_getAccelData(key); 1886 const SkPicture::AccelData* data = picture->EXPERIMENTAL_getAccelData(key);
1881 if (NULL == data) { 1887 if (NULL == data) {
1882 return false; 1888 return false;
1883 } 1889 }
1884 1890
1885 const GPUAccelData *gpuData = static_cast<const GPUAccelData*>(data); 1891 const GPUAccelData *gpuData = static_cast<const GPUAccelData*>(data);
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 } 2130 }
2125 2131
2126 return true; 2132 return true;
2127 } 2133 }
2128 2134
2129 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 2135 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
2130 // We always return a transient cache, so it is freed after each 2136 // We always return a transient cache, so it is freed after each
2131 // filter traversal. 2137 // filter traversal.
2132 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 2138 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
2133 } 2139 }
OLDNEW
« no previous file with comments | « src/gpu/GrPictureUtils.cpp ('k') | src/pipe/SkGPipeWrite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698