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

Side by Side Diff: cc/layers/layer.cc

Issue 202523002: cc: Replace Region with SimpleEnclosedRegion for occlusion tracking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simpleregion: . Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
11 #include "base/location.h" 11 #include "base/location.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "cc/animation/animation.h" 15 #include "cc/animation/animation.h"
16 #include "cc/animation/animation_events.h" 16 #include "cc/animation/animation_events.h"
17 #include "cc/animation/animation_registrar.h" 17 #include "cc/animation/animation_registrar.h"
18 #include "cc/animation/keyframed_animation_curve.h" 18 #include "cc/animation/keyframed_animation_curve.h"
19 #include "cc/animation/layer_animation_controller.h" 19 #include "cc/animation/layer_animation_controller.h"
20 #include "cc/base/simple_enclosed_region.h"
20 #include "cc/layers/layer_client.h" 21 #include "cc/layers/layer_client.h"
21 #include "cc/layers/layer_impl.h" 22 #include "cc/layers/layer_impl.h"
22 #include "cc/layers/scrollbar_layer_interface.h" 23 #include "cc/layers/scrollbar_layer_interface.h"
23 #include "cc/output/copy_output_request.h" 24 #include "cc/output/copy_output_request.h"
24 #include "cc/output/copy_output_result.h" 25 #include "cc/output/copy_output_result.h"
25 #include "cc/trees/layer_tree_host.h" 26 #include "cc/trees/layer_tree_host.h"
26 #include "cc/trees/layer_tree_impl.h" 27 #include "cc/trees/layer_tree_impl.h"
27 #include "third_party/skia/include/core/SkImageFilter.h" 28 #include "third_party/skia/include/core/SkImageFilter.h"
28 #include "ui/gfx/geometry/vector2d_conversions.h" 29 #include "ui/gfx/geometry/vector2d_conversions.h"
29 #include "ui/gfx/rect_conversions.h" 30 #include "ui/gfx/rect_conversions.h"
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 void Layer::AddLayerAnimationEventObserver( 1173 void Layer::AddLayerAnimationEventObserver(
1173 LayerAnimationEventObserver* animation_observer) { 1174 LayerAnimationEventObserver* animation_observer) {
1174 layer_animation_controller_->AddEventObserver(animation_observer); 1175 layer_animation_controller_->AddEventObserver(animation_observer);
1175 } 1176 }
1176 1177
1177 void Layer::RemoveLayerAnimationEventObserver( 1178 void Layer::RemoveLayerAnimationEventObserver(
1178 LayerAnimationEventObserver* animation_observer) { 1179 LayerAnimationEventObserver* animation_observer) {
1179 layer_animation_controller_->RemoveEventObserver(animation_observer); 1180 layer_animation_controller_->RemoveEventObserver(animation_observer);
1180 } 1181 }
1181 1182
1182 Region Layer::VisibleContentOpaqueRegion() const { 1183 SimpleEnclosedRegion Layer::VisibleContentOpaqueRegion() const {
1183 if (contents_opaque()) 1184 if (contents_opaque())
1184 return visible_content_rect(); 1185 return SimpleEnclosedRegion(visible_content_rect());
1185 return Region(); 1186 return SimpleEnclosedRegion();
1186 } 1187 }
1187 1188
1188 ScrollbarLayerInterface* Layer::ToScrollbarLayer() { 1189 ScrollbarLayerInterface* Layer::ToScrollbarLayer() {
1189 return NULL; 1190 return NULL;
1190 } 1191 }
1191 1192
1192 RenderingStatsInstrumentation* Layer::rendering_stats_instrumentation() const { 1193 RenderingStatsInstrumentation* Layer::rendering_stats_instrumentation() const {
1193 return layer_tree_host_->rendering_stats_instrumentation(); 1194 return layer_tree_host_->rendering_stats_instrumentation();
1194 } 1195 }
1195 1196
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 1237
1237 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) { 1238 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) {
1238 benchmark->RunOnLayer(this); 1239 benchmark->RunOnLayer(this);
1239 } 1240 }
1240 1241
1241 bool Layer::HasDelegatedContent() const { 1242 bool Layer::HasDelegatedContent() const {
1242 return false; 1243 return false;
1243 } 1244 }
1244 1245
1245 } // namespace cc 1246 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698