aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrGpu.cpp')
-rw-r--r--src/gpu/GrGpu.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index ab8e5cb535..39d190e052 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,