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

Unified Diff: src/gpu/GrContext.cpp

Issue 1249543003: Creating functions for uploading a mipmapped texture. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Rebasing Created 5 years, 1 month 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
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())) {
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrGpu.h » ('j') | src/gpu/GrSurface.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698