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

Unified Diff: cc/output/gl_renderer.cc

Issue 2235623003: cc: Add gfx::ColorSpace to cc::ResourceProvider resource creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 b757766dbef74e6a6592fcca4c1bff5fad22c4ee..d50229920bc02e5ac81b45dcb462e0fbca3aff47 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -893,9 +893,10 @@ std::unique_ptr<ScopedResource> GLRenderer::GetBackdropTexture(
std::unique_ptr<ScopedResource> device_background_texture =
ScopedResource::Create(resource_provider_);
// CopyTexImage2D fails when called on a texture having immutable storage.
- device_background_texture->Allocate(
- bounding_rect.size(), ResourceProvider::TEXTURE_HINT_DEFAULT,
- resource_provider_->best_texture_format());
+ device_background_texture->Allocate(bounding_rect.size(),
+ ResourceProvider::TEXTURE_HINT_DEFAULT,
+ resource_provider_->best_texture_format(),
+ output_surface_->device_color_space());
{
ResourceProvider::ScopedWriteLockGL lock(
resource_provider_, device_background_texture->id(), false);
@@ -1039,7 +1040,8 @@ void GLRenderer::DrawRenderPassQuad(DrawingFrame* frame,
TileDrawQuad* tile_quad = &bypass->second;
// RGBA_8888 here is arbitrary and unused.
Resource tile_resource(tile_quad->resource_id(), tile_quad->texture_size,
- ResourceFormat::RGBA_8888);
+ ResourceFormat::RGBA_8888,
+ output_surface_->device_color_space());
// The projection matrix used by GLRenderer has a flip. As tile texture
// inputs are oriented opposite to framebuffer outputs, don't flip via
// texture coords and let the projection matrix naturallyd o it.
@@ -2398,7 +2400,7 @@ void GLRenderer::DrawYUVVideoQuad(const DrawingFrame* frame,
if (lut_texture_location != -1) {
unsigned int lut_texture = color_lut_cache_.GetLUT(
- quad->video_color_space, output_surface_->color_space(), 32);
+ quad->video_color_space, output_surface_->device_color_space(), 32);
gl_->ActiveTexture(GL_TEXTURE5);
gl_->BindTexture(GL_TEXTURE_2D, lut_texture);
gl_->Uniform1i(lut_texture_location, 5);
@@ -3983,7 +3985,7 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
// Establish destination texture.
*resource = overlay_resource_pool_->AcquireResource(
gfx::Size(updated_dst_rect.width(), updated_dst_rect.height()),
- ResourceFormat::RGBA_8888);
+ ResourceFormat::RGBA_8888, output_surface_->device_color_space());
ResourceProvider::ScopedWriteLockGL destination(resource_provider_,
(*resource)->id(), false);
GLuint temp_fbo;
« 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