| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 | 8 |
| 9 #include "GrGpu.h" | 9 #include "GrGpu.h" |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 GrGpu::GrGpu(GrContext* context) | 45 GrGpu::GrGpu(GrContext* context) |
| 46 : fResetTimestamp(kExpiredTimestamp+1) | 46 : fResetTimestamp(kExpiredTimestamp+1) |
| 47 , fResetBits(kAll_GrBackendState) | 47 , fResetBits(kAll_GrBackendState) |
| 48 , fMultisampleSpecsAllocator(1) | 48 , fMultisampleSpecsAllocator(1) |
| 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::disconnect(DisconnectType) {} |
| 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 GrTextureProducer::CopyParams* copyParams)
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); |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 int meshCount) { | 480 int meshCount) { |
| 481 if (primProc.numAttribs() > this->caps()->maxVertexAttributes()) { | 481 if (primProc.numAttribs() > this->caps()->maxVertexAttributes()) { |
| 482 fStats.incNumFailedDraws(); | 482 fStats.incNumFailedDraws(); |
| 483 return false; | 483 return false; |
| 484 } | 484 } |
| 485 this->handleDirtyContext(); | 485 this->handleDirtyContext(); |
| 486 | 486 |
| 487 this->onDraw(pipeline, primProc, meshes, meshCount); | 487 this->onDraw(pipeline, primProc, meshes, meshCount); |
| 488 return true; | 488 return true; |
| 489 } | 489 } |
| OLD | NEW |