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

Unified Diff: components/bitmap_uploader/bitmap_uploader.cc

Issue 2113533002: Makes BitmapUploader handle null GLES2Context (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « components/bitmap_uploader/bitmap_uploader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/bitmap_uploader/bitmap_uploader.cc
diff --git a/components/bitmap_uploader/bitmap_uploader.cc b/components/bitmap_uploader/bitmap_uploader.cc
index 13f410d08cc662bb7ad9563f1291c938396fec80..8650a9547bee5a6de768402a557d1179e9e9a3f2 100644
--- a/components/bitmap_uploader/bitmap_uploader.cc
+++ b/components/bitmap_uploader/bitmap_uploader.cc
@@ -46,7 +46,7 @@ void BitmapUploader::Init(shell::Connector* connector) {
gles2_context_ = mus::GLES2Context::CreateOffscreenContext(
std::vector<int32_t>(), connector);
- DCHECK(gles2_context_);
+ // CreateOffscreenContext() may return null.
}
// Sets the color which is RGBA.
@@ -72,6 +72,9 @@ void BitmapUploader::SetBitmap(int width,
}
void BitmapUploader::Upload() {
+ if (!gles2_context_)
+ return;
+
const gfx::Rect bounds(window_->bounds().size());
cc::CompositorFrame frame;
« no previous file with comments | « components/bitmap_uploader/bitmap_uploader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698