| OLD | NEW | 
|---|
| 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 "GrCaps.h" | 8 #include "GrCaps.h" | 
| 9 #include "GrContext.h" | 9 #include "GrContext.h" | 
| 10 #include "GrDrawContext.h" | 10 #include "GrDrawContext.h" | 
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 285 ////////////////////////////////////////////////////////////////////////////////
     /////////////////// | 285 ////////////////////////////////////////////////////////////////////////////////
     /////////////////// | 
| 286 | 286 | 
| 287 GrTexture* GrDeepCopyTexture(GrTexture* src, bool budgeted) { | 287 GrTexture* GrDeepCopyTexture(GrTexture* src, bool budgeted) { | 
| 288     GrContext* ctx = src->getContext(); | 288     GrContext* ctx = src->getContext(); | 
| 289 | 289 | 
| 290     GrSurfaceDesc desc = src->desc(); | 290     GrSurfaceDesc desc = src->desc(); | 
| 291     GrTexture* dst = ctx->textureProvider()->createTexture(desc, budgeted, nullp
     tr, 0); | 291     GrTexture* dst = ctx->textureProvider()->createTexture(desc, budgeted, nullp
     tr, 0); | 
| 292     if (!dst) { | 292     if (!dst) { | 
| 293         return nullptr; | 293         return nullptr; | 
| 294     } | 294     } | 
| 295 | 295 | 
| 296     const SkIRect srcR = SkIRect::MakeWH(desc.fWidth, desc.fHeight); | 296     const SkIRect srcR = SkIRect::MakeWH(desc.fWidth, desc.fHeight); | 
| 297     const SkIPoint dstP = SkIPoint::Make(0, 0); | 297     const SkIPoint dstP = SkIPoint::Make(0, 0); | 
| 298     ctx->copySurface(dst, src, srcR, dstP, GrContext::kFlushWrites_PixelOp); | 298     ctx->copySurface(dst, src, srcR, dstP, GrContext::kFlushWrites_PixelOp); | 
| 299     return dst; | 299     return dst; | 
| 300 } | 300 } | 
| 301 | 301 | 
| OLD | NEW | 
|---|