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

Unified Diff: cc/output/gl_renderer.cc

Issue 1951193002: cc: Add mailbox support to ResourceProvider write locks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@worker_context_stream
Patch Set: fix gpu Created 4 years, 7 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 | cc/raster/gpu_raster_buffer_provider.h » ('j') | cc/resources/resource_provider.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 6a75674271e6921f2f0658f281f12aa86425776e..32f5d36ebcd5725192c1ad83153dfb35175002e2 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -841,9 +841,10 @@ std::unique_ptr<ScopedResource> GLRenderer::GetBackdropTexture(
bounding_rect.size(), ResourceProvider::TEXTURE_HINT_DEFAULT,
resource_provider_->best_texture_format());
{
- ResourceProvider::ScopedWriteLockGL lock(resource_provider_,
- device_background_texture->id());
- GetFramebufferTexture(lock.texture_id(), RGBA_8888, bounding_rect);
+ ResourceProvider::ScopedWriteLockGL lock(
+ resource_provider_, device_background_texture->id(), false);
+ GetFramebufferTexture(lock.ProduceTextureId(), RGBA_8888, bounding_rect);
+ lock.ReleaseTextureId();
}
return device_background_texture;
}
@@ -2987,10 +2988,11 @@ bool GLRenderer::BindFramebufferToTexture(DrawingFrame* frame,
gl_->BindFramebuffer(GL_FRAMEBUFFER, offscreen_framebuffer_id_);
current_framebuffer_lock_ =
base::WrapUnique(new ResourceProvider::ScopedWriteLockGL(
- resource_provider_, texture->id()));
- unsigned texture_id = current_framebuffer_lock_->texture_id();
+ resource_provider_, texture->id(), false));
+ unsigned texture_id = current_framebuffer_lock_->ProduceTextureId();
gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
texture_id, 0);
+ current_framebuffer_lock_->ReleaseTextureId();
DCHECK(gl_->CheckFramebufferStatus(GL_FRAMEBUFFER) ==
GL_FRAMEBUFFER_COMPLETE ||
« no previous file with comments | « no previous file | cc/raster/gpu_raster_buffer_provider.h » ('j') | cc/resources/resource_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698