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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2735943002: cc: Clarify that color spaces are for raster (Closed)
Patch Set: Rebase (a few times) Created 3 years, 9 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/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.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 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 1316
1317 void LayerTreeHostImpl::SetIsLikelyToRequireADraw( 1317 void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
1318 bool is_likely_to_require_a_draw) { 1318 bool is_likely_to_require_a_draw) {
1319 // Proactively tell the scheduler that we expect to draw within each vsync 1319 // Proactively tell the scheduler that we expect to draw within each vsync
1320 // until we get all the tiles ready to draw. If we happen to miss a required 1320 // until we get all the tiles ready to draw. If we happen to miss a required
1321 // for draw tile here, then we will miss telling the scheduler each frame that 1321 // for draw tile here, then we will miss telling the scheduler each frame that
1322 // we intend to draw so it may make worse scheduling decisions. 1322 // we intend to draw so it may make worse scheduling decisions.
1323 is_likely_to_require_a_draw_ = is_likely_to_require_a_draw; 1323 is_likely_to_require_a_draw_ = is_likely_to_require_a_draw;
1324 } 1324 }
1325 1325
1326 gfx::ColorSpace LayerTreeHostImpl::GetTileColorSpace() const { 1326 gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace() const {
1327 if (!sync_tree()) 1327 if (!sync_tree())
1328 return gfx::ColorSpace::CreateSRGB(); 1328 return gfx::ColorSpace::CreateSRGB();
1329 return sync_tree()->device_color_space(); 1329 return sync_tree()->raster_color_space();
1330 } 1330 }
1331 1331
1332 void LayerTreeHostImpl::RequestImplSideInvalidation() { 1332 void LayerTreeHostImpl::RequestImplSideInvalidation() {
1333 client_->NeedsImplSideInvalidation(); 1333 client_->NeedsImplSideInvalidation();
1334 } 1334 }
1335 1335
1336 void LayerTreeHostImpl::NotifyReadyToActivate() { 1336 void LayerTreeHostImpl::NotifyReadyToActivate() {
1337 client_->NotifyReadyToActivate(); 1337 client_->NotifyReadyToActivate();
1338 } 1338 }
1339 1339
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
2372 compositor_frame_sink_ = compositor_frame_sink; 2372 compositor_frame_sink_ = compositor_frame_sink;
2373 has_valid_compositor_frame_sink_ = true; 2373 has_valid_compositor_frame_sink_ = true;
2374 resource_provider_ = base::MakeUnique<ResourceProvider>( 2374 resource_provider_ = base::MakeUnique<ResourceProvider>(
2375 compositor_frame_sink_->context_provider(), 2375 compositor_frame_sink_->context_provider(),
2376 compositor_frame_sink_->shared_bitmap_manager(), 2376 compositor_frame_sink_->shared_bitmap_manager(),
2377 compositor_frame_sink_->gpu_memory_buffer_manager(), 2377 compositor_frame_sink_->gpu_memory_buffer_manager(),
2378 task_runner_provider_->blocking_main_thread_task_runner(), 2378 task_runner_provider_->blocking_main_thread_task_runner(),
2379 settings_.renderer_settings.texture_id_allocation_chunk_size, 2379 settings_.renderer_settings.texture_id_allocation_chunk_size,
2380 compositor_frame_sink_->capabilities().delegated_sync_points_required, 2380 compositor_frame_sink_->capabilities().delegated_sync_points_required,
2381 settings_.renderer_settings.use_gpu_memory_buffer_resources, 2381 settings_.renderer_settings.use_gpu_memory_buffer_resources,
2382 settings_.enable_color_correct_rendering, 2382 settings_.enable_color_correct_rasterization,
2383 settings_.renderer_settings.buffer_to_texture_target_map); 2383 settings_.renderer_settings.buffer_to_texture_target_map);
2384 2384
2385 // Since the new context may be capable of MSAA, update status here. We don't 2385 // Since the new context may be capable of MSAA, update status here. We don't
2386 // need to check the return value since we are recreating all resources 2386 // need to check the return value since we are recreating all resources
2387 // already. 2387 // already.
2388 UpdateGpuRasterizationStatus(); 2388 UpdateGpuRasterizationStatus();
2389 2389
2390 // See note in LayerTreeImpl::UpdateDrawProperties, new CompositorFrameSink 2390 // See note in LayerTreeImpl::UpdateDrawProperties, new CompositorFrameSink
2391 // means a new max texture size which affects draw properties. Also, if the 2391 // means a new max texture size which affects draw properties. Also, if the
2392 // draw properties were up to date, layers still lost resources and we need to 2392 // draw properties were up to date, layers still lost resources and we need to
(...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after
4159 worker_context_visibility_ = 4159 worker_context_visibility_ =
4160 worker_context->CacheController()->ClientBecameVisible(); 4160 worker_context->CacheController()->ClientBecameVisible();
4161 } else { 4161 } else {
4162 worker_context->CacheController()->ClientBecameNotVisible( 4162 worker_context->CacheController()->ClientBecameNotVisible(
4163 std::move(worker_context_visibility_)); 4163 std::move(worker_context_visibility_));
4164 } 4164 }
4165 } 4165 }
4166 } 4166 }
4167 4167
4168 } // namespace cc 4168 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698