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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/occlusion.h ('k') | cc/trees/occlusion_tracker.h » ('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 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 "cc/trees/occlusion.h" 5 #include "cc/trees/occlusion.h"
6 6
7 #include "cc/base/math_util.h" 7 #include "cc/base/math_util.h"
8 #include "ui/gfx/geometry/rect.h" 8 #include "ui/gfx/geometry/rect.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // These subtract operations are more lossy than if we did both operations at 78 // These subtract operations are more lossy than if we did both operations at
79 // once. 79 // once.
80 unoccluded_rect_in_target_surface.Subtract( 80 unoccluded_rect_in_target_surface.Subtract(
81 occlusion_from_inside_target_.bounds()); 81 occlusion_from_inside_target_.bounds());
82 unoccluded_rect_in_target_surface.Subtract( 82 unoccluded_rect_in_target_surface.Subtract(
83 occlusion_from_outside_target_.bounds()); 83 occlusion_from_outside_target_.bounds());
84 84
85 return unoccluded_rect_in_target_surface; 85 return unoccluded_rect_in_target_surface;
86 } 86 }
87 87
88 bool Occlusion::IsEqual(const Occlusion& other) const {
89 return draw_transform_ == other.draw_transform_ &&
90 occlusion_from_inside_target_ == other.occlusion_from_inside_target_ &&
91 occlusion_from_outside_target_ == other.occlusion_from_outside_target_;
92 }
93
94 std::string Occlusion::ToString() const {
95 return draw_transform_.ToString() + "outside(" +
96 occlusion_from_outside_target_.ToString() + ") inside(" +
97 occlusion_from_inside_target_.ToString() + ")";
98 }
99
88 } // namespace cc 100 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/occlusion.h ('k') | cc/trees/occlusion_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698