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

Unified Diff: src/gpu/GrGpu.cpp

Issue 1703603002: Workaround for bug in Tegra 3 when uploading to a render target (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add comment Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index ab8e5cb5359a4e025f748a89a0db69fc365c6313..39d190e05252ad8564768189348f7389c7c26078 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -280,10 +280,13 @@ bool GrGpu::getWritePixelsInfo(GrSurface* dstSurface, int width, int height, siz
return false;
}
- if (this->caps()->useDrawInsteadOfPartialRenderTargetWrite() &&
- SkToBool(dstSurface->asRenderTarget()) &&
- (width < dstSurface->width() || height < dstSurface->height())) {
- ElevateDrawPreference(drawPreference, kRequireDraw_DrawPreference);
+ if (SkToBool(dstSurface->asRenderTarget())) {
+ if (this->caps()->useDrawInsteadOfAllRenderTargetWrites()) {
+ ElevateDrawPreference(drawPreference, kRequireDraw_DrawPreference);
+ } else if (this->caps()->useDrawInsteadOfPartialRenderTargetWrite() &&
+ (width < dstSurface->width() || height < dstSurface->height())) {
+ ElevateDrawPreference(drawPreference, kRequireDraw_DrawPreference);
+ }
}
if (!this->onGetWritePixelsInfo(dstSurface, width, height, rowBytes, srcConfig, drawPreference,
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698