| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "GrGpu.h" | 10 #include "GrGpu.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 , fContext(context) { | 49 , fContext(context) { |
| 50 } | 50 } |
| 51 | 51 |
| 52 GrGpu::~GrGpu() {} | 52 GrGpu::~GrGpu() {} |
| 53 | 53 |
| 54 void GrGpu::contextAbandoned() {} | 54 void GrGpu::contextAbandoned() {} |
| 55 | 55 |
| 56 //////////////////////////////////////////////////////////////////////////////// | 56 //////////////////////////////////////////////////////////////////////////////// |
| 57 | 57 |
| 58 bool GrGpu::makeCopyForTextureParams(int width, int height, const GrTextureParam
s& textureParams, | 58 bool GrGpu::makeCopyForTextureParams(int width, int height, const GrTextureParam
s& textureParams, |
| 59 GrTextureParamsAdjuster::CopyParams* copyPa
rams) const { | 59 GrTextureProducer::CopyParams* copyParams)
const { |
| 60 const GrCaps& caps = *this->caps(); | 60 const GrCaps& caps = *this->caps(); |
| 61 if (textureParams.isTiled() && !caps.npotTextureTileSupport() && | 61 if (textureParams.isTiled() && !caps.npotTextureTileSupport() && |
| 62 (!SkIsPow2(width) || !SkIsPow2(height))) { | 62 (!SkIsPow2(width) || !SkIsPow2(height))) { |
| 63 copyParams->fWidth = GrNextPow2(width); | 63 copyParams->fWidth = GrNextPow2(width); |
| 64 copyParams->fHeight = GrNextPow2(height); | 64 copyParams->fHeight = GrNextPow2(height); |
| 65 switch (textureParams.filterMode()) { | 65 switch (textureParams.filterMode()) { |
| 66 case GrTextureParams::kNone_FilterMode: | 66 case GrTextureParams::kNone_FilterMode: |
| 67 copyParams->fFilter = GrTextureParams::kNone_FilterMode; | 67 copyParams->fFilter = GrTextureParams::kNone_FilterMode; |
| 68 break; | 68 break; |
| 69 case GrTextureParams::kBilerp_FilterMode: | 69 case GrTextureParams::kBilerp_FilterMode: |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 this->xferBarrier(args.fPipeline->getRenderTarget(), barrierType); | 343 this->xferBarrier(args.fPipeline->getRenderTarget(), barrierType); |
| 344 } | 344 } |
| 345 | 345 |
| 346 GrVertices::Iterator iter; | 346 GrVertices::Iterator iter; |
| 347 const GrNonInstancedVertices* verts = iter.init(vertices); | 347 const GrNonInstancedVertices* verts = iter.init(vertices); |
| 348 do { | 348 do { |
| 349 this->onDraw(args, *verts); | 349 this->onDraw(args, *verts); |
| 350 fStats.incNumDraws(); | 350 fStats.incNumDraws(); |
| 351 } while ((verts = iter.next())); | 351 } while ((verts = iter.next())); |
| 352 } | 352 } |
| OLD | NEW |