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

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

Issue 2502373003: stop using SkXfermode -- use SkBlendMode instead (Closed)
Patch Set: rebase Created 4 years, 1 month 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
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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 // TODO(danakj): Make the gutter quads generated by the solid color layer 724 // TODO(danakj): Make the gutter quads generated by the solid color layer
725 // (make it smarter about generating quads to fill unoccluded areas). 725 // (make it smarter about generating quads to fill unoccluded areas).
726 726
727 gfx::Rect root_target_rect = root_render_surface->content_rect(); 727 gfx::Rect root_target_rect = root_render_surface->content_rect();
728 float opacity = 1.f; 728 float opacity = 1.f;
729 int sorting_context_id = 0; 729 int sorting_context_id = 0;
730 SharedQuadState* shared_quad_state = 730 SharedQuadState* shared_quad_state =
731 target_render_pass->CreateAndAppendSharedQuadState(); 731 target_render_pass->CreateAndAppendSharedQuadState();
732 shared_quad_state->SetAll(gfx::Transform(), root_target_rect.size(), 732 shared_quad_state->SetAll(gfx::Transform(), root_target_rect.size(),
733 root_target_rect, root_target_rect, false, opacity, 733 root_target_rect, root_target_rect, false, opacity,
734 SkXfermode::kSrcOver_Mode, sorting_context_id); 734 SkBlendMode::kSrcOver, sorting_context_id);
735 735
736 for (Region::Iterator fill_rects(fill_region); fill_rects.has_rect(); 736 for (Region::Iterator fill_rects(fill_region); fill_rects.has_rect();
737 fill_rects.next()) { 737 fill_rects.next()) {
738 gfx::Rect screen_space_rect = fill_rects.rect(); 738 gfx::Rect screen_space_rect = fill_rects.rect();
739 gfx::Rect visible_screen_space_rect = screen_space_rect; 739 gfx::Rect visible_screen_space_rect = screen_space_rect;
740 // Skip the quad culler and just append the quads directly to avoid 740 // Skip the quad culler and just append the quads directly to avoid
741 // occlusion checks. 741 // occlusion checks.
742 SolidColorDrawQuad* quad = 742 SolidColorDrawQuad* quad =
743 target_render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>(); 743 target_render_pass->CreateAndAppendDrawQuad<SolidColorDrawQuad>();
744 quad->SetNew(shared_quad_state, screen_space_rect, 744 quad->SetNew(shared_quad_state, screen_space_rect,
(...skipping 3335 matching lines...) Expand 10 before | Expand all | Expand 10 after
4080 worker_context_visibility_ = 4080 worker_context_visibility_ =
4081 worker_context->CacheController()->ClientBecameVisible(); 4081 worker_context->CacheController()->ClientBecameVisible();
4082 } else { 4082 } else {
4083 worker_context->CacheController()->ClientBecameNotVisible( 4083 worker_context->CacheController()->ClientBecameNotVisible(
4084 std::move(worker_context_visibility_)); 4084 std::move(worker_context_visibility_));
4085 } 4085 }
4086 } 4086 }
4087 } 4087 }
4088 4088
4089 } // namespace cc 4089 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_pixeltest_blending.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698