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

Side by Side Diff: src/image/SkImage_Gpu.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 2012 Google Inc. 2 * Copyright 2012 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 "SkBitmapCache.h" 8 #include "SkBitmapCache.h"
9 #include "SkImage_Gpu.h" 9 #include "SkImage_Gpu.h"
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 //////////////////////////////////////////////////////////////////////////////// /////////////////// 273 //////////////////////////////////////////////////////////////////////////////// ///////////////////
274 274
275 GrTexture* GrDeepCopyTexture(GrTexture* src, bool budgeted) { 275 GrTexture* GrDeepCopyTexture(GrTexture* src, bool budgeted) {
276 GrContext* ctx = src->getContext(); 276 GrContext* ctx = src->getContext();
277 277
278 GrSurfaceDesc desc = src->desc(); 278 GrSurfaceDesc desc = src->desc();
279 GrTexture* dst = ctx->textureProvider()->createTexture(desc, budgeted, nullp tr, 0); 279 GrTexture* dst = ctx->textureProvider()->createTexture(desc, budgeted, nullp tr, 0);
280 if (!dst) { 280 if (!dst) {
281 return nullptr; 281 return nullptr;
282 } 282 }
283 283
284 const SkIRect srcR = SkIRect::MakeWH(desc.fWidth, desc.fHeight); 284 const SkIRect srcR = SkIRect::MakeWH(desc.fWidth, desc.fHeight);
285 const SkIPoint dstP = SkIPoint::Make(0, 0); 285 const SkIPoint dstP = SkIPoint::Make(0, 0);
286 ctx->copySurface(dst, src, srcR, dstP, GrContext::kFlushWrites_PixelOp); 286 ctx->copySurface(dst, src, srcR, dstP, GrContext::kFlushWrites_PixelOp);
287 return dst; 287 return dst;
288 } 288 }
289 289
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698