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 "GrBlurUtils.h" | 10 #include "GrBlurUtils.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 at = kPremul_SkAlphaType; // force this setting | 222 at = kPremul_SkAlphaType; // force this setting |
223 } | 223 } |
224 const SkImageInfo info = SkImageInfo::Make(origInfo.width(), origInfo.height
(), ct, at); | 224 const SkImageInfo info = SkImageInfo::Make(origInfo.width(), origInfo.height
(), ct, at); |
225 | 225 |
226 GrSurfaceDesc desc; | 226 GrSurfaceDesc desc; |
227 desc.fFlags = kRenderTarget_GrSurfaceFlag; | 227 desc.fFlags = kRenderTarget_GrSurfaceFlag; |
228 desc.fWidth = info.width(); | 228 desc.fWidth = info.width(); |
229 desc.fHeight = info.height(); | 229 desc.fHeight = info.height(); |
230 desc.fConfig = SkImageInfo2GrPixelConfig(info); | 230 desc.fConfig = SkImageInfo2GrPixelConfig(info); |
231 desc.fSampleCnt = sampleCount; | 231 desc.fSampleCnt = sampleCount; |
| 232 desc.fIsMipMapped = false; |
232 GrTexture* texture = context->textureProvider()->createTexture( | 233 GrTexture* texture = context->textureProvider()->createTexture( |
233 desc, SkToBool(budgeted), nullptr, 0); | 234 desc, SkToBool(budgeted), nullptr, 0); |
234 if (nullptr == texture) { | 235 if (nullptr == texture) { |
235 return nullptr; | 236 return nullptr; |
236 } | 237 } |
237 SkASSERT(nullptr != texture->asRenderTarget()); | 238 SkASSERT(nullptr != texture->asRenderTarget()); |
238 return texture->asRenderTarget(); | 239 return texture->asRenderTarget(); |
239 } | 240 } |
240 | 241 |
241 SkGpuDevice::~SkGpuDevice() { | 242 SkGpuDevice::~SkGpuDevice() { |
(...skipping 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1975 #endif | 1976 #endif |
1976 } | 1977 } |
1977 | 1978 |
1978 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { | 1979 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { |
1979 // We always return a transient cache, so it is freed after each | 1980 // We always return a transient cache, so it is freed after each |
1980 // filter traversal. | 1981 // filter traversal. |
1981 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); | 1982 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); |
1982 } | 1983 } |
1983 | 1984 |
1984 #endif | 1985 #endif |
OLD | NEW |