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 "GrGLBuffer.h" | 9 #include "GrGLBuffer.h" |
10 #include "GrGLGLSL.h" | 10 #include "GrGLGLSL.h" |
(...skipping 4514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4525 case kBlend_GrXferBarrierType: | 4525 case kBlend_GrXferBarrierType: |
4526 SkASSERT(GrCaps::kAdvanced_BlendEquationSupport == | 4526 SkASSERT(GrCaps::kAdvanced_BlendEquationSupport == |
4527 this->caps()->blendEquationSupport()); | 4527 this->caps()->blendEquationSupport()); |
4528 GL_CALL(BlendBarrier()); | 4528 GL_CALL(BlendBarrier()); |
4529 return; | 4529 return; |
4530 default: break; // placate compiler warnings that kNone not handled | 4530 default: break; // placate compiler warnings that kNone not handled |
4531 } | 4531 } |
4532 } | 4532 } |
4533 | 4533 |
4534 GrBackendObject GrGLGpu::createTestingOnlyBackendTexture(void* pixels, int w, in
t h, | 4534 GrBackendObject GrGLGpu::createTestingOnlyBackendTexture(void* pixels, int w, in
t h, |
4535 GrPixelConfig config) { | 4535 GrPixelConfig config, b
ool /*isRT*/) { |
4536 if (!this->caps()->isConfigTexturable(config)) { | 4536 if (!this->caps()->isConfigTexturable(config)) { |
4537 return false; | 4537 return false; |
4538 } | 4538 } |
4539 GrGLTextureInfo* info = new GrGLTextureInfo; | 4539 GrGLTextureInfo* info = new GrGLTextureInfo; |
4540 info->fTarget = GR_GL_TEXTURE_2D; | 4540 info->fTarget = GR_GL_TEXTURE_2D; |
4541 info->fID = 0; | 4541 info->fID = 0; |
4542 GL_CALL(GenTextures(1, &info->fID)); | 4542 GL_CALL(GenTextures(1, &info->fID)); |
4543 GL_CALL(ActiveTexture(GR_GL_TEXTURE0)); | 4543 GL_CALL(ActiveTexture(GR_GL_TEXTURE0)); |
4544 GL_CALL(PixelStorei(GR_GL_UNPACK_ALIGNMENT, 1)); | 4544 GL_CALL(PixelStorei(GR_GL_UNPACK_ALIGNMENT, 1)); |
4545 GL_CALL(BindTexture(info->fTarget, info->fID)); | 4545 GL_CALL(BindTexture(info->fTarget, info->fID)); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4651 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || | 4651 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || |
4652 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { | 4652 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { |
4653 copyParams->fFilter = GrTextureParams::kNone_FilterMode; | 4653 copyParams->fFilter = GrTextureParams::kNone_FilterMode; |
4654 copyParams->fWidth = texture->width(); | 4654 copyParams->fWidth = texture->width(); |
4655 copyParams->fHeight = texture->height(); | 4655 copyParams->fHeight = texture->height(); |
4656 return true; | 4656 return true; |
4657 } | 4657 } |
4658 } | 4658 } |
4659 return false; | 4659 return false; |
4660 } | 4660 } |
OLD | NEW |