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

Unified Diff: mojo/services/public/cpp/view_manager/lib/bitmap_uploader.cc

Issue 569173007: Always make context current in ViewManager's BitmapUploader, be laxer in SurfaceResourceHolder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « cc/surfaces/surface_resource_holder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/public/cpp/view_manager/lib/bitmap_uploader.cc
diff --git a/mojo/services/public/cpp/view_manager/lib/bitmap_uploader.cc b/mojo/services/public/cpp/view_manager/lib/bitmap_uploader.cc
index 60eeeeac3bc33d08fd600694b6dcc0c536cfeff7..d085f6f763a26df309cf561613296c6437ee2c81 100644
--- a/mojo/services/public/cpp/view_manager/lib/bitmap_uploader.cc
+++ b/mojo/services/public/cpp/view_manager/lib/bitmap_uploader.cc
@@ -106,6 +106,7 @@ void BitmapUploader::Upload() {
pass->quads.resize(0u);
pass->shared_quad_states.push_back(CreateDefaultSQS(size_));
+ MojoGLES2MakeCurrent(gles2_context_);
if (!bitmap_.isNull()) {
gfx::Size bitmap_size(bitmap_.width(), bitmap_.height());
GLuint texture_id = BindTextureForSize(bitmap_size);
@@ -185,6 +186,9 @@ void BitmapUploader::Upload() {
}
void BitmapUploader::ReturnResources(Array<ReturnedResourcePtr> resources) {
+ if (!resources.size())
+ return;
+ MojoGLES2MakeCurrent(gles2_context_);
// TODO(jamesr): Recycle.
for (size_t i = 0; i < resources.size(); ++i) {
ReturnedResourcePtr resource = resources[i].Pass();
« no previous file with comments | « cc/surfaces/surface_resource_holder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698