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

Unified Diff: cc/output/gl_renderer.cc

Issue 486853002: cc: Use a normal texture for background texture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits in unittests Created 6 years, 4 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/output/direct_renderer.cc ('k') | cc/output/gl_renderer_unittest.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 92af7bc34dc09ca578c4ed4067b9c3943ecf8ecf..7fcf54055fc5224ee0cd3853c2aeaf7d2f640fe2 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -899,11 +899,9 @@ scoped_ptr<ScopedResource> GLRenderer::GetBackgroundWithFilters(
scoped_ptr<ScopedResource> device_background_texture =
ScopedResource::Create(resource_provider_);
- // The TextureUsageFramebuffer hint makes ResourceProvider avoid immutable
- // storage allocation (texStorage2DEXT) for this texture. copyTexImage2D fails
- // when called on a texture having immutable storage.
+ // CopyTexImage2D fails when called on a texture having immutable storage.
device_background_texture->Allocate(
- window_rect.size(), ResourceProvider::TextureUsageFramebuffer, RGBA_8888);
+ window_rect.size(), ResourceProvider::TextureHintDefault, RGBA_8888);
{
ResourceProvider::ScopedWriteLockGL lock(resource_provider_,
device_background_texture->id());
@@ -941,7 +939,9 @@ scoped_ptr<ScopedResource> GLRenderer::GetBackgroundWithFilters(
scoped_ptr<ScopedResource> background_texture =
ScopedResource::Create(resource_provider_);
background_texture->Allocate(
- quad->rect.size(), ResourceProvider::TextureUsageFramebuffer, RGBA_8888);
+ quad->rect.size(),
+ ResourceProvider::TextureHintImmutableFramebuffer,
+ RGBA_8888);
const RenderPass* target_render_pass = frame->current_render_pass;
bool using_background_texture =
@@ -1929,13 +1929,13 @@ void GLRenderer::DrawPictureQuad(const DrawingFrame* frame,
if (on_demand_tile_raster_resource_id_)
resource_provider_->DeleteResource(on_demand_tile_raster_resource_id_);
- on_demand_tile_raster_resource_id_ =
- resource_provider_->CreateGLTexture(quad->texture_size,
- GL_TEXTURE_2D,
- GL_TEXTURE_POOL_UNMANAGED_CHROMIUM,
- GL_CLAMP_TO_EDGE,
- ResourceProvider::TextureUsageAny,
- quad->texture_format);
+ on_demand_tile_raster_resource_id_ = resource_provider_->CreateGLTexture(
+ quad->texture_size,
+ GL_TEXTURE_2D,
+ GL_TEXTURE_POOL_UNMANAGED_CHROMIUM,
+ GL_CLAMP_TO_EDGE,
+ ResourceProvider::TextureHintImmutable,
+ quad->texture_format);
}
// Create and run on-demand raster task for tile.
« no previous file with comments | « cc/output/direct_renderer.cc ('k') | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698