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

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

Issue 183563003: cc: Clean up OcclusionTracker template parameters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: occlusionparams: Created 6 years, 9 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
« no previous file with comments | « cc/layers/tiled_layer.cc ('k') | cc/layers/ui_resource_layer_unittest.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/layers/tiled_layer.h" 5 #include "cc/layers/tiled_layer.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
11 #include "cc/debug/overdraw_metrics.h" 11 #include "cc/debug/overdraw_metrics.h"
12 #include "cc/resources/bitmap_content_layer_updater.h" 12 #include "cc/resources/bitmap_content_layer_updater.h"
13 #include "cc/resources/layer_painter.h" 13 #include "cc/resources/layer_painter.h"
14 #include "cc/resources/prioritized_resource_manager.h" 14 #include "cc/resources/prioritized_resource_manager.h"
15 #include "cc/resources/resource_update_controller.h" 15 #include "cc/resources/resource_update_controller.h"
16 #include "cc/test/animation_test_common.h" 16 #include "cc/test/animation_test_common.h"
17 #include "cc/test/fake_layer_tree_host_client.h" 17 #include "cc/test/fake_layer_tree_host_client.h"
18 #include "cc/test/fake_layer_tree_host_impl.h" 18 #include "cc/test/fake_layer_tree_host_impl.h"
19 #include "cc/test/fake_output_surface.h" 19 #include "cc/test/fake_output_surface.h"
20 #include "cc/test/fake_output_surface_client.h" 20 #include "cc/test/fake_output_surface_client.h"
21 #include "cc/test/fake_proxy.h" 21 #include "cc/test/fake_proxy.h"
22 #include "cc/test/fake_rendering_stats_instrumentation.h" 22 #include "cc/test/fake_rendering_stats_instrumentation.h"
23 #include "cc/test/geometry_test_utils.h" 23 #include "cc/test/geometry_test_utils.h"
24 #include "cc/test/tiled_layer_test_common.h" 24 #include "cc/test/tiled_layer_test_common.h"
25 #include "cc/trees/occlusion_tracker.h"
25 #include "cc/trees/single_thread_proxy.h" 26 #include "cc/trees/single_thread_proxy.h"
26 #include "testing/gtest/include/gtest/gtest.h" 27 #include "testing/gtest/include/gtest/gtest.h"
27 #include "ui/gfx/rect_conversions.h" 28 #include "ui/gfx/rect_conversions.h"
28 #include "ui/gfx/transform.h" 29 #include "ui/gfx/transform.h"
29 30
30 namespace cc { 31 namespace cc {
31 namespace { 32 namespace {
32 33
33 class TestOcclusionTracker : public OcclusionTracker { 34 class TestOcclusionTracker : public OcclusionTracker<Layer> {
34 public: 35 public:
35 TestOcclusionTracker() : OcclusionTracker(gfx::Rect(0, 0, 1000, 1000), true) { 36 TestOcclusionTracker() : OcclusionTracker(gfx::Rect(0, 0, 1000, 1000), true) {
36 stack_.push_back(StackObject()); 37 stack_.push_back(StackObject());
37 } 38 }
38 39
39 void SetRenderTarget(Layer* render_target) { 40 void SetRenderTarget(Layer* render_target) {
40 stack_.back().target = render_target; 41 stack_.back().target = render_target;
41 } 42 }
42 43
43 void SetOcclusion(const Region& occlusion) { 44 void SetOcclusion(const Region& occlusion) {
(...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after
1994 // Invalidate the entire layer in layer space. When painting, the rect given 1995 // Invalidate the entire layer in layer space. When painting, the rect given
1995 // to webkit should match the layer's bounds. 1996 // to webkit should match the layer's bounds.
1996 layer->SetNeedsDisplayRect(layer_rect); 1997 layer->SetNeedsDisplayRect(layer_rect);
1997 layer->Update(queue_.get(), NULL); 1998 layer->Update(queue_.get(), NULL);
1998 1999
1999 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect()); 2000 EXPECT_RECT_EQ(layer_rect, layer->tracking_layer_painter()->PaintedRect());
2000 } 2001 }
2001 2002
2002 } // namespace 2003 } // namespace
2003 } // namespace cc 2004 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer.cc ('k') | cc/layers/ui_resource_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698