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

Unified Diff: cc/resources/gpu_rasterizer.cc

Issue 988953002: gpu-raster: Check for NULL sk_surface in GpuRasterizer::RasterizeSource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/gpu_rasterizer.cc
diff --git a/cc/resources/gpu_rasterizer.cc b/cc/resources/gpu_rasterizer.cc
index 6e318edabbe80a2c670eef3baf96abf9dd36d990..9adce07072454c6fb3b7f749af2bc4f98e65190a 100644
--- a/cc/resources/gpu_rasterizer.cc
+++ b/cc/resources/gpu_rasterizer.cc
@@ -120,9 +120,13 @@ void GpuRasterizer::RasterizeSource(
write_lock->InitSkSurface(use_worker_context, use_distance_field_text,
raster_source->CanUseLCDText(),
msaa_sample_count_);
+
+ SkSurface* sk_surface = write_lock->sk_surface();
+ if (!sk_surface)
danakj 2015/03/09 16:38:03 Can you add a comment explaining this is for lost
vmiura 2015/03/09 18:01:26 Done.
+ return;
+
SkMultiPictureDraw multi_picture_draw;
- multi_picture_draw.add(write_lock->sk_surface()->getCanvas(),
- picture.get());
+ multi_picture_draw.add(sk_surface->getCanvas(), picture.get());
multi_picture_draw.draw(msaa_sample_count_ > 0);
write_lock->ReleaseSkSurface();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698