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

Unified Diff: cc/output/gl_renderer.cc

Issue 79603002: ResourceProvider should be able to avoid allocating immutable textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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/resources/resource_provider.cc » ('j') | no next file with comments »
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 ea2d2b57288068b45ca5e6e6ba6618611355be53..d0119fd7d53f8d059d3be20e2397955b480f6f9b 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -616,9 +616,13 @@ scoped_ptr<ScopedResource> GLRenderer::DrawBackgroundFilters(
scoped_ptr<ScopedResource> device_background_texture =
ScopedResource::create(resource_provider_);
- if (!device_background_texture->Allocate(window_rect.size(),
- ResourceProvider::TextureUsageAny,
- RGBA_8888)) {
+ // The TextureUsageFramebuffer hint makes ResourceProvider to avoid immutable
danakj 2013/11/21 00:20:41 s/to avoid/avoid/
+ // storage allocation (texStorage2DEXT) for this texture. copyTexImage2D fails
+ // when called on a texture having immutable storage.
+ if (!device_background_texture->Allocate(
+ window_rect.size(),
+ ResourceProvider::TextureUsageFramebuffer,
+ RGBA_8888)) {
return scoped_ptr<ScopedResource>();
} else {
ResourceProvider::ScopedWriteLockGL lock(resource_provider_,
« no previous file with comments | « no previous file | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698