OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/viz/service/display/surface_aggregator.h" | 5 #include "components/viz/service/display/surface_aggregator.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 size_t sqs_size = source.shared_quad_state_list.size(); | 258 size_t sqs_size = source.shared_quad_state_list.size(); |
259 size_t dq_size = source.quad_list.size(); | 259 size_t dq_size = source.quad_list.size(); |
260 std::unique_ptr<cc::RenderPass> copy_pass( | 260 std::unique_ptr<cc::RenderPass> copy_pass( |
261 cc::RenderPass::Create(sqs_size, dq_size)); | 261 cc::RenderPass::Create(sqs_size, dq_size)); |
262 | 262 |
263 cc::RenderPassId remapped_pass_id = RemapPassId(source.id, surface_id); | 263 cc::RenderPassId remapped_pass_id = RemapPassId(source.id, surface_id); |
264 | 264 |
265 copy_pass->SetAll(remapped_pass_id, source.output_rect, source.output_rect, | 265 copy_pass->SetAll(remapped_pass_id, source.output_rect, source.output_rect, |
266 source.transform_to_root_target, source.filters, | 266 source.transform_to_root_target, source.filters, |
267 source.background_filters, blending_color_space_, | 267 source.background_filters, blending_color_space_, |
268 source.has_transparent_background); | 268 source.has_transparent_background, |
| 269 source.cache_render_pass, |
| 270 source.has_damage_from_contributing_content); |
269 | 271 |
270 MoveMatchingRequests(source.id, ©_requests, ©_pass->copy_requests); | 272 MoveMatchingRequests(source.id, ©_requests, ©_pass->copy_requests); |
271 | 273 |
272 // Contributing passes aggregated in to the pass list need to take the | 274 // Contributing passes aggregated in to the pass list need to take the |
273 // transform of the surface quad into account to update their transform to | 275 // transform of the surface quad into account to update their transform to |
274 // the root surface. | 276 // the root surface. |
275 copy_pass->transform_to_root_target.ConcatTransform( | 277 copy_pass->transform_to_root_target.ConcatTransform( |
276 surface_quad->shared_quad_state->quad_to_target_transform); | 278 surface_quad->shared_quad_state->quad_to_target_transform); |
277 copy_pass->transform_to_root_target.ConcatTransform(target_transform); | 279 copy_pass->transform_to_root_target.ConcatTransform(target_transform); |
278 copy_pass->transform_to_root_target.ConcatTransform( | 280 copy_pass->transform_to_root_target.ConcatTransform( |
279 dest_pass->transform_to_root_target); | 281 dest_pass->transform_to_root_target); |
280 | 282 |
281 CopyQuadsToPass(source.quad_list, source.shared_quad_state_list, | 283 CopyQuadsToPass(source.quad_list, source.shared_quad_state_list, |
282 child_to_parent_map, gfx::Transform(), ClipData(), | 284 child_to_parent_map, gfx::Transform(), ClipData(), |
283 copy_pass.get(), surface_id); | 285 copy_pass.get(), surface_id); |
284 | 286 |
| 287 // If the render pass has copy requests, or should be cached, or has |
| 288 // moving-pixel filters, or in a moving-pixel surface, we should damage the |
| 289 // whole output rect so that we always drawn the full content. Otherwise, we |
| 290 // might have incompleted copy request, or cached patially drawn render |
| 291 // pass. |
285 if (!copy_request_passes_.count(remapped_pass_id) && | 292 if (!copy_request_passes_.count(remapped_pass_id) && |
| 293 !copy_pass->cache_render_pass && |
286 !moved_pixel_passes_.count(remapped_pass_id)) { | 294 !moved_pixel_passes_.count(remapped_pass_id)) { |
287 gfx::Transform inverse_transform(gfx::Transform::kSkipInitialization); | 295 gfx::Transform inverse_transform(gfx::Transform::kSkipInitialization); |
288 if (copy_pass->transform_to_root_target.GetInverse(&inverse_transform)) { | 296 if (copy_pass->transform_to_root_target.GetInverse(&inverse_transform)) { |
289 gfx::Rect damage_rect_in_render_pass_space = | 297 gfx::Rect damage_rect_in_render_pass_space = |
290 cc::MathUtil::ProjectEnclosingClippedRect(inverse_transform, | 298 cc::MathUtil::ProjectEnclosingClippedRect(inverse_transform, |
291 root_damage_rect_); | 299 root_damage_rect_); |
292 copy_pass->damage_rect.Intersect(damage_rect_in_render_pass_space); | 300 copy_pass->damage_rect.Intersect(damage_rect_in_render_pass_space); |
293 } | 301 } |
294 } | 302 } |
295 | 303 |
| 304 if (copy_pass->has_damage_from_contributing_content) |
| 305 contributing_content_damaged_passes_.insert(copy_pass->id); |
296 dest_pass_list_->push_back(std::move(copy_pass)); | 306 dest_pass_list_->push_back(std::move(copy_pass)); |
297 } | 307 } |
298 | 308 |
299 gfx::Transform surface_transform = | 309 gfx::Transform surface_transform = |
300 surface_quad->shared_quad_state->quad_to_target_transform; | 310 surface_quad->shared_quad_state->quad_to_target_transform; |
301 surface_transform.ConcatTransform(target_transform); | 311 surface_transform.ConcatTransform(target_transform); |
302 | 312 |
303 const auto& last_pass = *render_pass_list.back(); | 313 const auto& last_pass = *render_pass_list.back(); |
| 314 // This will check if all the surface_quads (including child surfaces) has |
| 315 // damage because HandleSurfaceQuad is a recursive call by calling |
| 316 // CopyQuadsToPass in it. |
| 317 dest_pass->has_damage_from_contributing_content |= |
| 318 !DamageRectForSurface(surface, last_pass, last_pass.output_rect) |
| 319 .IsEmpty(); |
| 320 |
304 if (merge_pass) { | 321 if (merge_pass) { |
305 // TODO(jamesr): Clean up last pass special casing. | 322 // TODO(jamesr): Clean up last pass special casing. |
306 const cc::QuadList& quads = last_pass.quad_list; | 323 const cc::QuadList& quads = last_pass.quad_list; |
307 | 324 |
308 // Intersect the transformed visible rect and the clip rect to create a | 325 // Intersect the transformed visible rect and the clip rect to create a |
309 // smaller cliprect for the quad. | 326 // smaller cliprect for the quad. |
310 ClipData surface_quad_clip_rect( | 327 ClipData surface_quad_clip_rect( |
311 true, cc::MathUtil::MapEnclosingClippedRect( | 328 true, cc::MathUtil::MapEnclosingClippedRect( |
312 surface_quad->shared_quad_state->quad_to_target_transform, | 329 surface_quad->shared_quad_state->quad_to_target_transform, |
313 surface_quad->visible_rect)); | 330 surface_quad->visible_rect)); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 const cc::QuadList& source_quad_list, | 420 const cc::QuadList& source_quad_list, |
404 const cc::SharedQuadStateList& source_shared_quad_state_list, | 421 const cc::SharedQuadStateList& source_shared_quad_state_list, |
405 const std::unordered_map<cc::ResourceId, cc::ResourceId>& | 422 const std::unordered_map<cc::ResourceId, cc::ResourceId>& |
406 child_to_parent_map, | 423 child_to_parent_map, |
407 const gfx::Transform& target_transform, | 424 const gfx::Transform& target_transform, |
408 const ClipData& clip_rect, | 425 const ClipData& clip_rect, |
409 cc::RenderPass* dest_pass, | 426 cc::RenderPass* dest_pass, |
410 const SurfaceId& surface_id) { | 427 const SurfaceId& surface_id) { |
411 const cc::SharedQuadState* last_copied_source_shared_quad_state = nullptr; | 428 const cc::SharedQuadState* last_copied_source_shared_quad_state = nullptr; |
412 const cc::SharedQuadState* dest_shared_quad_state = nullptr; | 429 const cc::SharedQuadState* dest_shared_quad_state = nullptr; |
413 // If the current frame has copy requests then aggregate the entire | 430 // If the current frame has copy requests or cached render passes, then |
414 // thing, as otherwise parts of the copy requests may be ignored. | 431 // aggregate the entire thing, as otherwise parts of the copy requests may be |
415 const bool ignore_undamaged = aggregate_only_damaged_ && | 432 // ignored and we could cache partially drawn render pass. |
416 !has_copy_requests_ && | 433 const bool ignore_undamaged = |
417 !moved_pixel_passes_.count(dest_pass->id); | 434 aggregate_only_damaged_ && !has_copy_requests_ && |
| 435 !has_cached_render_passes_ && !moved_pixel_passes_.count(dest_pass->id); |
418 // Damage rect in the quad space of the current shared quad state. | 436 // Damage rect in the quad space of the current shared quad state. |
419 // TODO(jbauman): This rect may contain unnecessary area if | 437 // TODO(jbauman): This rect may contain unnecessary area if |
420 // transform isn't axis-aligned. | 438 // transform isn't axis-aligned. |
421 gfx::Rect damage_rect_in_quad_space; | 439 gfx::Rect damage_rect_in_quad_space; |
422 bool damage_rect_in_quad_space_valid = false; | 440 bool damage_rect_in_quad_space_valid = false; |
423 | 441 |
424 #if DCHECK_IS_ON() | 442 #if DCHECK_IS_ON() |
425 // If quads have come in with SharedQuadState out of order, or when quads have | 443 // If quads have come in with SharedQuadState out of order, or when quads have |
426 // invalid SharedQuadState pointer, it should DCHECK. | 444 // invalid SharedQuadState pointer, it should DCHECK. |
427 auto sqs_iter = source_shared_quad_state_list.cbegin(); | 445 auto sqs_iter = source_shared_quad_state_list.cbegin(); |
(...skipping 20 matching lines...) Expand all Loading... |
448 continue; | 466 continue; |
449 | 467 |
450 HandleSurfaceQuad(surface_quad, target_transform, clip_rect, dest_pass, | 468 HandleSurfaceQuad(surface_quad, target_transform, clip_rect, dest_pass, |
451 ignore_undamaged, &damage_rect_in_quad_space, | 469 ignore_undamaged, &damage_rect_in_quad_space, |
452 &damage_rect_in_quad_space_valid); | 470 &damage_rect_in_quad_space_valid); |
453 } else { | 471 } else { |
454 if (quad->shared_quad_state != last_copied_source_shared_quad_state) { | 472 if (quad->shared_quad_state != last_copied_source_shared_quad_state) { |
455 dest_shared_quad_state = CopySharedQuadState( | 473 dest_shared_quad_state = CopySharedQuadState( |
456 quad->shared_quad_state, target_transform, clip_rect, dest_pass); | 474 quad->shared_quad_state, target_transform, clip_rect, dest_pass); |
457 last_copied_source_shared_quad_state = quad->shared_quad_state; | 475 last_copied_source_shared_quad_state = quad->shared_quad_state; |
458 if (aggregate_only_damaged_ && !has_copy_requests_) { | 476 if (aggregate_only_damaged_ && !has_copy_requests_ && |
| 477 !has_cached_render_passes_) { |
459 damage_rect_in_quad_space_valid = CalculateQuadSpaceDamageRect( | 478 damage_rect_in_quad_space_valid = CalculateQuadSpaceDamageRect( |
460 dest_shared_quad_state->quad_to_target_transform, | 479 dest_shared_quad_state->quad_to_target_transform, |
461 dest_pass->transform_to_root_target, root_damage_rect_, | 480 dest_pass->transform_to_root_target, root_damage_rect_, |
462 &damage_rect_in_quad_space); | 481 &damage_rect_in_quad_space); |
463 } | 482 } |
464 } | 483 } |
465 | 484 |
466 if (ignore_undamaged) { | 485 if (ignore_undamaged) { |
467 if (damage_rect_in_quad_space_valid && | 486 if (damage_rect_in_quad_space_valid && |
468 !damage_rect_in_quad_space.Intersects(quad->visible_rect)) | 487 !damage_rect_in_quad_space.Intersects(quad->visible_rect)) |
469 continue; | 488 continue; |
470 } | 489 } |
471 | 490 |
472 cc::DrawQuad* dest_quad; | 491 cc::DrawQuad* dest_quad; |
473 if (quad->material == cc::DrawQuad::RENDER_PASS) { | 492 if (quad->material == cc::DrawQuad::RENDER_PASS) { |
474 const auto* pass_quad = cc::RenderPassDrawQuad::MaterialCast(quad); | 493 const auto* pass_quad = cc::RenderPassDrawQuad::MaterialCast(quad); |
475 int original_pass_id = pass_quad->render_pass_id; | 494 cc::RenderPassId original_pass_id = pass_quad->render_pass_id; |
476 int remapped_pass_id = RemapPassId(original_pass_id, surface_id); | 495 cc::RenderPassId remapped_pass_id = |
| 496 RemapPassId(original_pass_id, surface_id); |
| 497 |
| 498 // If the RenderPassDrawQuad is referring to other render pass with the |
| 499 // |has_damage_from_contributing_content| set on it, then the dest_pass |
| 500 // should have the flag set on it as well. |
| 501 if (contributing_content_damaged_passes_.count(remapped_pass_id)) |
| 502 dest_pass->has_damage_from_contributing_content = true; |
477 | 503 |
478 dest_quad = dest_pass->CopyFromAndAppendRenderPassDrawQuad( | 504 dest_quad = dest_pass->CopyFromAndAppendRenderPassDrawQuad( |
479 pass_quad, dest_shared_quad_state, remapped_pass_id); | 505 pass_quad, dest_shared_quad_state, remapped_pass_id); |
480 } else if (quad->material == cc::DrawQuad::TEXTURE_CONTENT) { | 506 } else if (quad->material == cc::DrawQuad::TEXTURE_CONTENT) { |
481 const auto* texture_quad = cc::TextureDrawQuad::MaterialCast(quad); | 507 const auto* texture_quad = cc::TextureDrawQuad::MaterialCast(quad); |
482 if (texture_quad->secure_output_only && | 508 if (texture_quad->secure_output_only && |
483 (!output_is_secure_ || copy_request_passes_.count(dest_pass->id))) { | 509 (!output_is_secure_ || copy_request_passes_.count(dest_pass->id))) { |
484 auto* solid_color_quad = | 510 auto* solid_color_quad = |
485 dest_pass->CreateAndAppendDrawQuad<cc::SolidColorDrawQuad>(); | 511 dest_pass->CreateAndAppendDrawQuad<cc::SolidColorDrawQuad>(); |
486 solid_color_quad->SetNew(dest_shared_quad_state, quad->rect, | 512 solid_color_quad->SetNew(dest_shared_quad_state, quad->rect, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 auto copy_pass = cc::RenderPass::Create(sqs_size, dq_size); | 561 auto copy_pass = cc::RenderPass::Create(sqs_size, dq_size); |
536 | 562 |
537 MoveMatchingRequests(source.id, ©_requests, ©_pass->copy_requests); | 563 MoveMatchingRequests(source.id, ©_requests, ©_pass->copy_requests); |
538 | 564 |
539 cc::RenderPassId remapped_pass_id = | 565 cc::RenderPassId remapped_pass_id = |
540 RemapPassId(source.id, surface->surface_id()); | 566 RemapPassId(source.id, surface->surface_id()); |
541 | 567 |
542 copy_pass->SetAll(remapped_pass_id, source.output_rect, source.output_rect, | 568 copy_pass->SetAll(remapped_pass_id, source.output_rect, source.output_rect, |
543 source.transform_to_root_target, source.filters, | 569 source.transform_to_root_target, source.filters, |
544 source.background_filters, blending_color_space_, | 570 source.background_filters, blending_color_space_, |
545 source.has_transparent_background); | 571 source.has_transparent_background, |
| 572 source.cache_render_pass, |
| 573 source.has_damage_from_contributing_content); |
546 | 574 |
547 CopyQuadsToPass(source.quad_list, source.shared_quad_state_list, | 575 CopyQuadsToPass(source.quad_list, source.shared_quad_state_list, |
548 child_to_parent_map, gfx::Transform(), ClipData(), | 576 child_to_parent_map, gfx::Transform(), ClipData(), |
549 copy_pass.get(), surface->surface_id()); | 577 copy_pass.get(), surface->surface_id()); |
| 578 |
| 579 // If the render pass has copy requests, or should be cached, or has |
| 580 // moving-pixel filters, or in a moving-pixel surface, we should damage the |
| 581 // whole output rect so that we always drawn the full content. Otherwise, we |
| 582 // might have incompleted copy request, or cached patially drawn render |
| 583 // pass. |
550 if (!copy_request_passes_.count(remapped_pass_id) && | 584 if (!copy_request_passes_.count(remapped_pass_id) && |
| 585 !copy_pass->cache_render_pass && |
551 !moved_pixel_passes_.count(remapped_pass_id)) { | 586 !moved_pixel_passes_.count(remapped_pass_id)) { |
552 gfx::Transform inverse_transform(gfx::Transform::kSkipInitialization); | 587 gfx::Transform inverse_transform(gfx::Transform::kSkipInitialization); |
553 if (copy_pass->transform_to_root_target.GetInverse(&inverse_transform)) { | 588 if (copy_pass->transform_to_root_target.GetInverse(&inverse_transform)) { |
554 gfx::Rect damage_rect_in_render_pass_space = | 589 gfx::Rect damage_rect_in_render_pass_space = |
555 cc::MathUtil::ProjectEnclosingClippedRect(inverse_transform, | 590 cc::MathUtil::ProjectEnclosingClippedRect(inverse_transform, |
556 root_damage_rect_); | 591 root_damage_rect_); |
557 copy_pass->damage_rect.Intersect(damage_rect_in_render_pass_space); | 592 copy_pass->damage_rect.Intersect(damage_rect_in_render_pass_space); |
558 } | 593 } |
559 } | 594 } |
560 | 595 |
| 596 if (copy_pass->has_damage_from_contributing_content) |
| 597 contributing_content_damaged_passes_.insert(copy_pass->id); |
561 dest_pass_list_->push_back(std::move(copy_pass)); | 598 dest_pass_list_->push_back(std::move(copy_pass)); |
562 } | 599 } |
563 } | 600 } |
564 | 601 |
565 void SurfaceAggregator::ProcessAddedAndRemovedSurfaces() { | 602 void SurfaceAggregator::ProcessAddedAndRemovedSurfaces() { |
566 for (const auto& surface : previous_contained_surfaces_) { | 603 for (const auto& surface : previous_contained_surfaces_) { |
567 if (!contained_surfaces_.count(surface.first)) { | 604 if (!contained_surfaces_.count(surface.first)) { |
568 // Release resources of removed surface. | 605 // Release resources of removed surface. |
569 auto it = surface_id_to_resource_child_id_.find(surface.first); | 606 auto it = surface_id_to_resource_child_id_.find(surface.first); |
570 if (it != surface_id_to_resource_child_id_.end()) { | 607 if (it != surface_id_to_resource_child_id_.end()) { |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 manager_->SurfaceWillDraw(surface->surface_id()); | 803 manager_->SurfaceWillDraw(surface->surface_id()); |
767 } | 804 } |
768 | 805 |
769 CHECK(debug_weak_this.get()); | 806 CHECK(debug_weak_this.get()); |
770 for (const auto& render_pass : frame.render_pass_list) { | 807 for (const auto& render_pass : frame.render_pass_list) { |
771 if (!render_pass->copy_requests.empty()) { | 808 if (!render_pass->copy_requests.empty()) { |
772 cc::RenderPassId remapped_pass_id = | 809 cc::RenderPassId remapped_pass_id = |
773 RemapPassId(render_pass->id, surface_id); | 810 RemapPassId(render_pass->id, surface_id); |
774 copy_request_passes_.insert(remapped_pass_id); | 811 copy_request_passes_.insert(remapped_pass_id); |
775 } | 812 } |
| 813 if (render_pass->cache_render_pass) |
| 814 has_cached_render_passes_ = true; |
776 } | 815 } |
777 | 816 |
778 // TODO(jbauman): Remove when https://crbug.com/745684 fixed. | 817 // TODO(jbauman): Remove when https://crbug.com/745684 fixed. |
779 CHECK(surface->surface_id() == surface_id); | 818 CHECK(surface->surface_id() == surface_id); |
780 auto it = referenced_surfaces_.find(surface_id); | 819 auto it = referenced_surfaces_.find(surface_id); |
781 // TODO(jbauman): Remove when https://crbug.com/745684 fixed. | 820 // TODO(jbauman): Remove when https://crbug.com/745684 fixed. |
782 CHECK(referenced_surfaces_.end() != it); | 821 CHECK(referenced_surfaces_.end() != it); |
783 referenced_surfaces_.erase(it); | 822 referenced_surfaces_.erase(it); |
784 if (!damage_rect.IsEmpty() && frame.metadata.may_contain_video) | 823 if (!damage_rect.IsEmpty() && frame.metadata.may_contain_video) |
785 result->may_contain_video = true; | 824 result->may_contain_video = true; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 return {}; | 899 return {}; |
861 | 900 |
862 const cc::CompositorFrame& root_surface_frame = surface->GetActiveFrame(); | 901 const cc::CompositorFrame& root_surface_frame = surface->GetActiveFrame(); |
863 TRACE_EVENT0("viz", "SurfaceAggregator::Aggregate"); | 902 TRACE_EVENT0("viz", "SurfaceAggregator::Aggregate"); |
864 | 903 |
865 cc::CompositorFrame frame; | 904 cc::CompositorFrame frame; |
866 | 905 |
867 dest_pass_list_ = &frame.render_pass_list; | 906 dest_pass_list_ = &frame.render_pass_list; |
868 | 907 |
869 valid_surfaces_.clear(); | 908 valid_surfaces_.clear(); |
| 909 has_cached_render_passes_ = false; |
870 PrewalkResult prewalk_result; | 910 PrewalkResult prewalk_result; |
871 root_damage_rect_ = PrewalkTree(surface_id, false, 0, &prewalk_result); | 911 root_damage_rect_ = PrewalkTree(surface_id, false, 0, &prewalk_result); |
872 PropagateCopyRequestPasses(); | 912 PropagateCopyRequestPasses(); |
873 has_copy_requests_ = !copy_request_passes_.empty(); | 913 has_copy_requests_ = !copy_request_passes_.empty(); |
874 frame.metadata.may_contain_video = prewalk_result.may_contain_video; | 914 frame.metadata.may_contain_video = prewalk_result.may_contain_video; |
875 | 915 |
876 CopyUndrawnSurfaces(&prewalk_result); | 916 CopyUndrawnSurfaces(&prewalk_result); |
877 referenced_surfaces_.insert(surface_id); | 917 referenced_surfaces_.insert(surface_id); |
878 CopyPasses(root_surface_frame, surface); | 918 CopyPasses(root_surface_frame, surface); |
879 // CopyPasses may have mutated container, need to re-query to erase. | 919 // CopyPasses may have mutated container, need to re-query to erase. |
880 referenced_surfaces_.erase(referenced_surfaces_.find(surface_id)); | 920 referenced_surfaces_.erase(referenced_surfaces_.find(surface_id)); |
881 AddColorConversionPass(); | 921 AddColorConversionPass(); |
882 | 922 |
883 moved_pixel_passes_.clear(); | 923 moved_pixel_passes_.clear(); |
884 copy_request_passes_.clear(); | 924 copy_request_passes_.clear(); |
| 925 contributing_content_damaged_passes_.clear(); |
885 render_pass_dependencies_.clear(); | 926 render_pass_dependencies_.clear(); |
886 | 927 |
887 // Remove all render pass mappings that weren't used in the current frame. | 928 // Remove all render pass mappings that weren't used in the current frame. |
888 for (auto it = render_pass_allocator_map_.begin(); | 929 for (auto it = render_pass_allocator_map_.begin(); |
889 it != render_pass_allocator_map_.end();) { | 930 it != render_pass_allocator_map_.end();) { |
890 if (it->second.in_use) { | 931 if (it->second.in_use) { |
891 it->second.in_use = false; | 932 it->second.in_use = false; |
892 it++; | 933 it++; |
893 } else { | 934 } else { |
894 it = render_pass_allocator_map_.erase(it); | 935 it = render_pass_allocator_map_.erase(it); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 const gfx::ColorSpace& output_color_space) { | 988 const gfx::ColorSpace& output_color_space) { |
948 blending_color_space_ = blending_color_space.IsValid() | 989 blending_color_space_ = blending_color_space.IsValid() |
949 ? blending_color_space | 990 ? blending_color_space |
950 : gfx::ColorSpace::CreateSRGB(); | 991 : gfx::ColorSpace::CreateSRGB(); |
951 output_color_space_ = output_color_space.IsValid() | 992 output_color_space_ = output_color_space.IsValid() |
952 ? output_color_space | 993 ? output_color_space |
953 : gfx::ColorSpace::CreateSRGB(); | 994 : gfx::ColorSpace::CreateSRGB(); |
954 } | 995 } |
955 | 996 |
956 } // namespace viz | 997 } // namespace viz |
OLD | NEW |