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

Side by Side Diff: cc/output/gl_renderer.cc

Issue 2773043004: make --enable-hdr imply --enable-features=video-color-management (Closed)
Patch Set: option B Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/output/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2043 matching lines...) Expand 10 before | Expand all | Expand 10 after
2054 quad->v_plane_resource_id() == quad->u_plane_resource_id() 2054 quad->v_plane_resource_id() == quad->u_plane_resource_id()
2055 ? UV_TEXTURE_MODE_UV 2055 ? UV_TEXTURE_MODE_UV
2056 : UV_TEXTURE_MODE_U_V; 2056 : UV_TEXTURE_MODE_U_V;
2057 2057
2058 // TODO(ccameron): There are currently three sources of the color space: the 2058 // TODO(ccameron): There are currently three sources of the color space: the
2059 // resource, quad->color_space, and quad->video_color_space. Remove two of 2059 // resource, quad->color_space, and quad->video_color_space. Remove two of
2060 // them. 2060 // them.
2061 gfx::ColorSpace src_color_space = quad->video_color_space; 2061 gfx::ColorSpace src_color_space = quad->video_color_space;
2062 gfx::ColorSpace dst_color_space = 2062 gfx::ColorSpace dst_color_space =
2063 current_frame()->current_render_pass->color_space; 2063 current_frame()->current_render_pass->color_space;
2064 if (!base::FeatureList::IsEnabled(media::kVideoColorManagement)) { 2064 if (!base::FeatureList::IsEnabled(media::kVideoColorManagement) &&
2065 if (!settings_->enable_color_correct_rendering) 2065 !settings_->enable_color_correct_rendering) {
2066 dst_color_space = gfx::ColorSpace(); 2066 dst_color_space = gfx::ColorSpace();
2067 switch (quad->color_space) { 2067 switch (quad->color_space) {
2068 case YUVVideoDrawQuad::REC_601: 2068 case YUVVideoDrawQuad::REC_601:
2069 src_color_space = gfx::ColorSpace::CreateREC601(); 2069 src_color_space = gfx::ColorSpace::CreateREC601();
2070 break; 2070 break;
2071 case YUVVideoDrawQuad::REC_709: 2071 case YUVVideoDrawQuad::REC_709:
2072 src_color_space = gfx::ColorSpace::CreateREC709(); 2072 src_color_space = gfx::ColorSpace::CreateREC709();
2073 break; 2073 break;
2074 case YUVVideoDrawQuad::JPEG: 2074 case YUVVideoDrawQuad::JPEG:
2075 src_color_space = gfx::ColorSpace::CreateJpeg(); 2075 src_color_space = gfx::ColorSpace::CreateJpeg();
2076 break; 2076 break;
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after
3586 return; 3586 return;
3587 3587
3588 // Report GPU overdraw as a percentage of |max_result|. 3588 // Report GPU overdraw as a percentage of |max_result|.
3589 TRACE_COUNTER1( 3589 TRACE_COUNTER1(
3590 TRACE_DISABLED_BY_DEFAULT("cc.debug.overdraw"), "GPU Overdraw", 3590 TRACE_DISABLED_BY_DEFAULT("cc.debug.overdraw"), "GPU Overdraw",
3591 (std::accumulate(overdraw->begin(), overdraw->end(), 0) * 100) / 3591 (std::accumulate(overdraw->begin(), overdraw->end(), 0) * 100) /
3592 max_result); 3592 max_result);
3593 } 3593 }
3594 3594
3595 } // namespace cc 3595 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698