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

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

Issue 2852953003: Use real colorspace for DirectComposition overlays.
Patch Set: rebase Created 3 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 unified diff | Download patch
« no previous file with comments | « cc/output/dc_layer_overlay.cc ('k') | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | 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 3254 matching lines...) Expand 10 before | Expand all | Expand 10 after
3265 GLfloat transform[16]; 3265 GLfloat transform[16];
3266 dc_layer_overlay.shared_state->transform.asColMajorf(transform); 3266 dc_layer_overlay.shared_state->transform.asColMajorf(transform);
3267 unsigned filter = dc_layer_overlay.filter; 3267 unsigned filter = dc_layer_overlay.filter;
3268 3268
3269 if (dc_layer_overlay.shared_state != shared_state) { 3269 if (dc_layer_overlay.shared_state != shared_state) {
3270 shared_state = dc_layer_overlay.shared_state; 3270 shared_state = dc_layer_overlay.shared_state;
3271 gl_->ScheduleDCLayerSharedStateCHROMIUM( 3271 gl_->ScheduleDCLayerSharedStateCHROMIUM(
3272 dc_layer_overlay.shared_state->opacity, is_clipped, clip_rect, 3272 dc_layer_overlay.shared_state->opacity, is_clipped, clip_rect,
3273 z_order, transform); 3273 z_order, transform);
3274 } 3274 }
3275 gl_->ScheduleDCLayerCHROMIUM(ids_to_send, texture_ids, contents_rect, 3275 base::Pickle color_space_data;
3276 dc_layer_overlay.background_color, 3276 dc_layer_overlay.color_space.Serialize(&color_space_data);
hubbe 2017/06/20 18:23:28 This seems a little weird, shouldn't the gl layer
3277 dc_layer_overlay.edge_aa_mask, bounds_rect, 3277 gl_->ScheduleDCLayerCHROMIUM(
3278 filter); 3278 ids_to_send, texture_ids, contents_rect,
3279 dc_layer_overlay.background_color, dc_layer_overlay.edge_aa_mask,
3280 bounds_rect, filter, color_space_data.size(), color_space_data.data());
3279 } 3281 }
3280 3282
3281 // Take the number of copied render passes in this frame, and use 3 times that 3283 // Take the number of copied render passes in this frame, and use 3 times that
3282 // amount as the cache limit. 3284 // amount as the cache limit.
3283 if (overlay_resource_pool_) { 3285 if (overlay_resource_pool_) {
3284 overlay_resource_pool_->SetResourceUsageLimits( 3286 overlay_resource_pool_->SetResourceUsageLimits(
3285 std::numeric_limits<std::size_t>::max(), copied_render_pass_count * 5); 3287 std::numeric_limits<std::size_t>::max(), copied_render_pass_count * 5);
3286 } 3288 }
3287 } 3289 }
3288 3290
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
3609 return; 3611 return;
3610 3612
3611 // Report GPU overdraw as a percentage of |max_result|. 3613 // Report GPU overdraw as a percentage of |max_result|.
3612 TRACE_COUNTER1( 3614 TRACE_COUNTER1(
3613 TRACE_DISABLED_BY_DEFAULT("cc.debug.overdraw"), "GPU Overdraw", 3615 TRACE_DISABLED_BY_DEFAULT("cc.debug.overdraw"), "GPU Overdraw",
3614 (std::accumulate(overdraw->begin(), overdraw->end(), 0) * 100) / 3616 (std::accumulate(overdraw->begin(), overdraw->end(), 0) * 100) /
3615 max_result); 3617 max_result);
3616 } 3618 }
3617 3619
3618 } // namespace cc 3620 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/dc_layer_overlay.cc ('k') | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698