Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1778143003: Fix readback of 565 on Mac and enable tests (Closed) Base URL: https://skia.googlesource.com/skia.git@newtexfrompixmap
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tests/ImageTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2585 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 ElevateDrawPreference(drawPreference, kRequireDraw_DrawPrefe rence); 2596 ElevateDrawPreference(drawPreference, kRequireDraw_DrawPrefe rence);
2597 tempDrawInfo->fTempSurfaceDesc.fConfig = cpuTempConfig; 2597 tempDrawInfo->fTempSurfaceDesc.fConfig = cpuTempConfig;
2598 tempDrawInfo->fReadConfig = kAlpha_8_GrPixelConfig; 2598 tempDrawInfo->fReadConfig = kAlpha_8_GrPixelConfig;
2599 } else { 2599 } else {
2600 return false; 2600 return false;
2601 } 2601 }
2602 } else { 2602 } else {
2603 SkASSERT(tempDrawInfo->fTempSurfaceDesc.fConfig == srcConfig); 2603 SkASSERT(tempDrawInfo->fTempSurfaceDesc.fConfig == srcConfig);
2604 SkASSERT(tempDrawInfo->fReadConfig == kAlpha_8_GrPixelConfig); 2604 SkASSERT(tempDrawInfo->fReadConfig == kAlpha_8_GrPixelConfig);
2605 } 2605 }
2606 } else if (this->caps()->isConfigRenderable(readConfig, false) &&
2607 this->readPixelsSupported(readConfig, readConfig)) {
2608 // Do a draw to convert from the src config to the read config.
2609 ElevateDrawPreference(drawPreference, kRequireDraw_DrawPreference);
2610 tempDrawInfo->fTempSurfaceDesc.fConfig = readConfig;
2611 tempDrawInfo->fReadConfig = readConfig;
2606 } else { 2612 } else {
2607 return false; 2613 return false;
2608 } 2614 }
2609 } 2615 }
2610 2616
2611 if (srcAsRT && 2617 if (srcAsRT &&
2612 read_pixels_pays_for_y_flip(srcAsRT, this->glCaps(), width, height, read Config, rowBytes)) { 2618 read_pixels_pays_for_y_flip(srcAsRT, this->glCaps(), width, height, read Config, rowBytes)) {
2613 ElevateDrawPreference(drawPreference, kGpuPrefersDraw_DrawPreference); 2619 ElevateDrawPreference(drawPreference, kGpuPrefersDraw_DrawPreference);
2614 } 2620 }
2615 2621
(...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after
4346 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || 4352 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() ||
4347 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { 4353 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) {
4348 copyParams->fFilter = GrTextureParams::kNone_FilterMode; 4354 copyParams->fFilter = GrTextureParams::kNone_FilterMode;
4349 copyParams->fWidth = texture->width(); 4355 copyParams->fWidth = texture->width();
4350 copyParams->fHeight = texture->height(); 4356 copyParams->fHeight = texture->height();
4351 return true; 4357 return true;
4352 } 4358 }
4353 } 4359 }
4354 return false; 4360 return false;
4355 } 4361 }
OLDNEW
« no previous file with comments | « no previous file | tests/ImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698