OLD | NEW |
---|---|
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 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1857 } | 1857 } |
1858 | 1858 |
1859 const GrAccelData *gpuData = static_cast<const GrAccelData*>(data); | 1859 const GrAccelData *gpuData = static_cast<const GrAccelData*>(data); |
1860 | 1860 |
1861 if (0 == gpuData->numSaveLayers()) { | 1861 if (0 == gpuData->numSaveLayers()) { |
1862 return false; | 1862 return false; |
1863 } | 1863 } |
1864 | 1864 |
1865 SkAutoTArray<bool> pullForward(gpuData->numSaveLayers()); | 1865 SkAutoTArray<bool> pullForward(gpuData->numSaveLayers()); |
1866 | 1866 |
1867 SkRect clipBounds; | 1867 SkRect clipBounds = { 0, 0, 0, 0 }; |
mtklein
2014/09/03 15:46:12
Seems fine, but if we're returning when getClipBou
robertphillips
2014/09/03 17:36:24
Done.
| |
1868 if (!mainCanvas->getClipBounds(&clipBounds)) { | 1868 if (!mainCanvas->getClipBounds(&clipBounds)) { |
1869 return true; | 1869 return true; |
1870 } | 1870 } |
1871 | 1871 |
1872 SkAutoTDelete<const SkPicture::OperationList> ops( | 1872 SkAutoTDelete<const SkPicture::OperationList> ops( |
1873 picture->EXPERIMENTAL_getActiveOps(clipBounds)); | 1873 picture->EXPERIMENTAL_getActiveOps(clipBounds)); |
1874 | 1874 |
1875 if (!GrLayerHoister::FindLayersToHoist(gpuData, ops.get(), clipBounds, pullF orward.get())) { | 1875 if (!GrLayerHoister::FindLayersToHoist(gpuData, ops.get(), clipBounds, pullF orward.get())) { |
1876 return false; | 1876 return false; |
1877 } | 1877 } |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1944 GrLayerHoister::UnlockLayers(fContext->getLayerCache(), picture); | 1944 GrLayerHoister::UnlockLayers(fContext->getLayerCache(), picture); |
1945 | 1945 |
1946 return true; | 1946 return true; |
1947 } | 1947 } |
1948 | 1948 |
1949 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1949 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
1950 // We always return a transient cache, so it is freed after each | 1950 // We always return a transient cache, so it is freed after each |
1951 // filter traversal. | 1951 // filter traversal. |
1952 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); | 1952 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); |
1953 } | 1953 } |
OLD | NEW |