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

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: Fixing bad rebase. Created 5 years, 1 month 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
« src/gpu/SkGr.cpp ('K') | « src/gpu/gl/GrGLGpu.cpp ('k') | no next file » | 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 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 "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 //////////////////////////////////////////////////////////////////////////////// /////////////////// 398 //////////////////////////////////////////////////////////////////////////////// ///////////////////
399 399
400 GrTexture* GrDeepCopyTexture(GrTexture* src, bool budgeted) { 400 GrTexture* GrDeepCopyTexture(GrTexture* src, bool budgeted) {
401 GrContext* ctx = src->getContext(); 401 GrContext* ctx = src->getContext();
402 402
403 GrSurfaceDesc desc = src->desc(); 403 GrSurfaceDesc desc = src->desc();
404 GrTexture* dst = ctx->textureProvider()->createTexture(desc, budgeted, nullp tr, 0); 404 GrTexture* dst = ctx->textureProvider()->createTexture(desc, budgeted, nullp tr, 0);
405 if (!dst) { 405 if (!dst) {
406 return nullptr; 406 return nullptr;
407 } 407 }
408 408
409 const SkIRect srcR = SkIRect::MakeWH(desc.fWidth, desc.fHeight); 409 const SkIRect srcR = SkIRect::MakeWH(desc.fWidth, desc.fHeight);
410 const SkIPoint dstP = SkIPoint::Make(0, 0); 410 const SkIPoint dstP = SkIPoint::Make(0, 0);
411 ctx->copySurface(dst, src, srcR, dstP, GrContext::kFlushWrites_PixelOp); 411 ctx->copySurface(dst, src, srcR, dstP, GrContext::kFlushWrites_PixelOp);
412 return dst; 412 return dst;
413 } 413 }
414 414
OLDNEW
« src/gpu/SkGr.cpp ('K') | « src/gpu/gl/GrGLGpu.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698