aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-04-11 12:54:57 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-11 19:38:18 +0000
commit1119dc366e15ef737d05d3a087410ea40c508101 (patch)
tree0b1363476a28c6df8baf79a46dbee8a74eac48af /src/image
parentfafe135349bd34961a12bfd8185733709cd0e45e (diff)
Remove discard from GrRenderTarget & force it to always go through a RenderTargetContext
This is a bit sloppy in that it ignores some instances where discards were being issued before. The creation of the temp RTContext in the RenderTarget's discard method was causing an extra split in the opLists. This is split out of: https://skia-review.googlesource.com/c/10284/ (Omnibus: Remove GrSurface-derived classes from ops) Change-Id: Ic366d303280635763b0fae238c4df37c04fb8503 Reviewed-on: https://skia-review.googlesource.com/11125 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/image')
-rw-r--r--src/image/SkImage_Gpu.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 4bd04e1f4c..f81708f051 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -857,6 +857,7 @@ sk_sp<SkImage> SkImage::MakeTextureFromMipMap(GrContext* ctx, const SkImageInfo&
const GrMipLevel* texels, int mipLevelCount,
SkBudgeted budgeted,
SkDestinationSurfaceColorMode colorMode) {
+ SkASSERT(mipLevelCount >= 1);
if (!ctx) {
return nullptr;
}