| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "GrGLGpu.h" | 8 #include "GrGLGpu.h" |
| 9 #include "GrGLGLSL.h" | 9 #include "GrGLGLSL.h" |
| 10 #include "GrGLStencilAttachment.h" | 10 #include "GrGLStencilAttachment.h" |
| (...skipping 2399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2410 if (!flipY) { | 2410 if (!flipY) { |
| 2411 dst += rowBytes; | 2411 dst += rowBytes; |
| 2412 } else { | 2412 } else { |
| 2413 dst -= rowBytes; | 2413 dst -= rowBytes; |
| 2414 } | 2414 } |
| 2415 } | 2415 } |
| 2416 } | 2416 } |
| 2417 return true; | 2417 return true; |
| 2418 } | 2418 } |
| 2419 | 2419 |
| 2420 void GrGLGpu::performFlushWorkaround() { | 2420 void GrGLGpu::finishDrawTarget() { |
| 2421 if (fPLSHasBeenUsed) { | 2421 if (fPLSHasBeenUsed) { |
| 2422 /* There is an ARM driver bug where if we use PLS, and then draw a frame
which does not | 2422 /* There is an ARM driver bug where if we use PLS, and then draw a frame
which does not |
| 2423 * use PLS, it leaves garbage all over the place. As a workaround, we us
e PLS in a | 2423 * use PLS, it leaves garbage all over the place. As a workaround, we us
e PLS in a |
| 2424 * trivial way every frame. And since we use it every frame, there's nev
er a point at which | 2424 * trivial way every frame. And since we use it every frame, there's nev
er a point at which |
| 2425 * it becomes safe to stop using this workaround once we start. | 2425 * it becomes safe to stop using this workaround once we start. |
| 2426 */ | 2426 */ |
| 2427 this->disableScissor(); | 2427 this->disableScissor(); |
| 2428 // using PLS in the presence of MSAA results in GL_INVALID_OPERATION | 2428 // using PLS in the presence of MSAA results in GL_INVALID_OPERATION |
| 2429 this->flushHWAAState(nullptr, false, false); | 2429 this->flushHWAAState(nullptr, false, false); |
| 2430 SkASSERT(!fHWPLSEnabled); | 2430 SkASSERT(!fHWPLSEnabled); |
| (...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3891 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || | 3891 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || |
| 3892 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { | 3892 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { |
| 3893 copyParams->fFilter = GrTextureParams::kNone_FilterMode; | 3893 copyParams->fFilter = GrTextureParams::kNone_FilterMode; |
| 3894 copyParams->fWidth = texture->width(); | 3894 copyParams->fWidth = texture->width(); |
| 3895 copyParams->fHeight = texture->height(); | 3895 copyParams->fHeight = texture->height(); |
| 3896 return true; | 3896 return true; |
| 3897 } | 3897 } |
| 3898 } | 3898 } |
| 3899 return false; | 3899 return false; |
| 3900 } | 3900 } |
| OLD | NEW |