Index: src/gpu/GrContext.cpp |
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
index 755b0f2ec9d8bc8353542c88ea65f5ff6082229a..85bd6aab1b96e9897fe410bb38210b76301e3e3e 100644 |
--- a/src/gpu/GrContext.cpp |
+++ b/src/gpu/GrContext.cpp |
@@ -1,4 +1,3 @@ |
- |
/* |
* Copyright 2011 Google Inc. |
* |
@@ -19,6 +18,7 @@ |
#include "SkConfig8888.h" |
#include "SkGrPriv.h" |
+#include "SkTypes.h" |
#include "effects/GrConfigConversionEffect.h" |
@@ -246,7 +246,7 @@ bool GrContext::writeSurfacePixels(GrSurface* surface, |
} |
GrGpu::WritePixelTempDrawInfo tempDrawInfo; |
- if (!fGpu->getWritePixelsInfo(surface, width, height, rowBytes, srcConfig, &drawPreference, |
+ if (!fGpu->getWritePixelsInfo(surface, width, height, srcConfig, &drawPreference, |
&tempDrawInfo)) { |
return false; |
} |
@@ -335,6 +335,7 @@ bool GrContext::writeSurfacePixels(GrSurface* surface, |
if (!tempTexture) { |
if (applyPremulToSrc) { |
size_t tmpRowBytes = 4 * width; |
+ |
tmpPixels.reset(width * height); |
if (!sw_convert_to_premul(srcConfig, width, height, rowBytes, buffer, tmpRowBytes, |
tmpPixels.get())) { |