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

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: Rebasing. 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
« no previous file with comments | « src/gpu/GrTextureProvider.cpp ('k') | src/gpu/SkGr.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 "GrBlurUtils.h" 10 #include "GrBlurUtils.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 210 }
211 const SkImageInfo info = SkImageInfo::Make(origInfo.width(), origInfo.height (), ct, at); 211 const SkImageInfo info = SkImageInfo::Make(origInfo.width(), origInfo.height (), ct, at);
212 212
213 GrSurfaceDesc desc; 213 GrSurfaceDesc desc;
214 desc.fFlags = kRenderTarget_GrSurfaceFlag; 214 desc.fFlags = kRenderTarget_GrSurfaceFlag;
215 desc.fWidth = info.width(); 215 desc.fWidth = info.width();
216 desc.fHeight = info.height(); 216 desc.fHeight = info.height();
217 desc.fConfig = SkImageInfo2GrPixelConfig(info); 217 desc.fConfig = SkImageInfo2GrPixelConfig(info);
218 desc.fSampleCnt = sampleCount; 218 desc.fSampleCnt = sampleCount;
219 desc.fTextureStorageAllocator = textureStorageAllocator; 219 desc.fTextureStorageAllocator = textureStorageAllocator;
220 desc.fIsMipMapped = false;
220 GrTexture* texture = context->textureProvider()->createTexture(desc, budgete d, nullptr, 0); 221 GrTexture* texture = context->textureProvider()->createTexture(desc, budgete d, nullptr, 0);
221 if (nullptr == texture) { 222 if (nullptr == texture) {
222 return nullptr; 223 return nullptr;
223 } 224 }
224 SkASSERT(nullptr != texture->asRenderTarget()); 225 SkASSERT(nullptr != texture->asRenderTarget());
225 return texture->asRenderTarget(); 226 return texture->asRenderTarget();
226 } 227 }
227 228
228 /////////////////////////////////////////////////////////////////////////////// 229 ///////////////////////////////////////////////////////////////////////////////
229 230
(...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after
1945 } 1946 }
1946 1947
1947 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() { 1948 SkImageFilter::Cache* SkGpuDevice::getImageFilterCache() {
1948 ASSERT_SINGLE_OWNER 1949 ASSERT_SINGLE_OWNER
1949 // 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
1950 // filter traversal. 1951 // filter traversal.
1951 return SkGpuDevice::NewImageFilterCache(); 1952 return SkGpuDevice::NewImageFilterCache();
1952 } 1953 }
1953 1954
1954 #endif 1955 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrTextureProvider.cpp ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698