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

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

Issue 23455060: mix-blend-mode implementation for accelerated layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unittests fixed Created 7 years 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_common.cc ('k') | cc/trees/layer_tree_host_pixeltest_blending.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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 619
620 gfx::Rect root_target_rect = root_layer->render_surface()->content_rect(); 620 gfx::Rect root_target_rect = root_layer->render_surface()->content_rect();
621 float opacity = 1.f; 621 float opacity = 1.f;
622 SharedQuadState* shared_quad_state = 622 SharedQuadState* shared_quad_state =
623 quad_culler.UseSharedQuadState(SharedQuadState::Create()); 623 quad_culler.UseSharedQuadState(SharedQuadState::Create());
624 shared_quad_state->SetAll(root_layer->draw_transform(), 624 shared_quad_state->SetAll(root_layer->draw_transform(),
625 root_target_rect.size(), 625 root_target_rect.size(),
626 root_target_rect, 626 root_target_rect,
627 root_target_rect, 627 root_target_rect,
628 false, 628 false,
629 opacity); 629 opacity,
630 SkXfermode::kSrcOver_Mode);
630 631
631 AppendQuadsData append_quads_data; 632 AppendQuadsData append_quads_data;
632 633
633 gfx::Transform transform_to_layer_space(gfx::Transform::kSkipInitialization); 634 gfx::Transform transform_to_layer_space(gfx::Transform::kSkipInitialization);
634 bool did_invert = root_layer->screen_space_transform().GetInverse( 635 bool did_invert = root_layer->screen_space_transform().GetInverse(
635 &transform_to_layer_space); 636 &transform_to_layer_space);
636 DCHECK(did_invert); 637 DCHECK(did_invert);
637 for (Region::Iterator fill_rects(screen_background_color_region); 638 for (Region::Iterator fill_rects(screen_background_color_region);
638 fill_rects.has_rect(); 639 fill_rects.has_rect();
639 fill_rects.next()) { 640 fill_rects.next()) {
(...skipping 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2860 if (evicted_ui_resources_.empty()) 2861 if (evicted_ui_resources_.empty())
2861 client_->OnCanDrawStateChanged(CanDraw()); 2862 client_->OnCanDrawStateChanged(CanDraw());
2862 } 2863 }
2863 2864
2864 void LayerTreeHostImpl::ScheduleMicroBenchmark( 2865 void LayerTreeHostImpl::ScheduleMicroBenchmark(
2865 scoped_ptr<MicroBenchmarkImpl> benchmark) { 2866 scoped_ptr<MicroBenchmarkImpl> benchmark) {
2866 micro_benchmark_controller_.ScheduleRun(benchmark.Pass()); 2867 micro_benchmark_controller_.ScheduleRun(benchmark.Pass());
2867 } 2868 }
2868 2869
2869 } // namespace cc 2870 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.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