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

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

Issue 1249543003: Creating functions for uploading a mipmapped texture. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Removing the concept of a dirty mipmap. It is expected that the texture upload provides the mipmaps. Created 5 years, 3 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 #endif 1973 #endif
1973 } 1974 }
1974 1975
1975 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 1976 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
1976 // We always return a transient cache, so it is freed after each 1977 // We always return a transient cache, so it is freed after each
1977 // filter traversal. 1978 // filter traversal.
1978 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize); 1979 return SkImageFilter::Cache::Create(kDefaultImageFilterCacheSize);
1979 } 1980 }
1980 1981
1981 #endif 1982 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698