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

Unified Diff: cc/trees/layer_tree_host_unittest_occlusion.cc

Issue 645853008: Standardize usage of virtual/override/final in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatted Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_unittest_no_message_loop.cc ('k') | cc/trees/layer_tree_host_unittest_picture.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_occlusion.cc
diff --git a/cc/trees/layer_tree_host_unittest_occlusion.cc b/cc/trees/layer_tree_host_unittest_occlusion.cc
index 3e22f04f82bb53652ccb8638df182b10688c5050..fe87e44d66781f3fd4e9966a432ce421e6e75744 100644
--- a/cc/trees/layer_tree_host_unittest_occlusion.cc
+++ b/cc/trees/layer_tree_host_unittest_occlusion.cc
@@ -19,8 +19,8 @@ class TestLayer : public Layer {
return make_scoped_refptr(new TestLayer());
}
- virtual bool Update(ResourceUpdateQueue* update_queue,
- const OcclusionTracker<Layer>* occlusion) override {
+ bool Update(ResourceUpdateQueue* update_queue,
+ const OcclusionTracker<Layer>* occlusion) override {
if (!occlusion)
return false;
@@ -44,7 +44,7 @@ class TestLayer : public Layer {
TestLayer() : Layer() {
SetIsDrawable(true);
}
- virtual ~TestLayer() {}
+ ~TestLayer() override {}
SimpleEnclosedRegion occlusion_;
SimpleEnclosedRegion expected_occlusion_;
@@ -60,18 +60,16 @@ class LayerTreeHostOcclusionTest : public LayerTreeTest {
mask_(TestLayer::Create()) {
}
- virtual void BeginTest() override {
- PostSetNeedsCommitToMainThread();
- }
+ void BeginTest() override { PostSetNeedsCommitToMainThread(); }
- virtual void DidCommit() override {
+ void DidCommit() override {
TestLayer* root = static_cast<TestLayer*>(layer_tree_host()->root_layer());
VerifyOcclusion(root);
EndTest();
}
- virtual void AfterTest() override {}
+ void AfterTest() override {}
void VerifyOcclusion(TestLayer* layer) const {
EXPECT_EQ(layer->expected_occlusion().ToString(),
@@ -99,7 +97,7 @@ class LayerTreeHostOcclusionTest : public LayerTreeTest {
}
protected:
- virtual void InitializeSettings(LayerTreeSettings* settings) override {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->minimum_occlusion_tracking_size = gfx::Size();
}
@@ -116,7 +114,7 @@ class LayerTreeHostOcclusionTest : public LayerTreeTest {
class LayerTreeHostOcclusionTestOcclusionSurfaceClipping
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// The child layer is a surface and the grand_child is opaque, but clipped
// to the child and root
SetLayerPropertiesForTesting(
@@ -146,7 +144,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(
class LayerTreeHostOcclusionTestOcclusionSurfaceClippingOpaque
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer is opaque, then it adds to the occlusion seen by the
// root_.
SetLayerPropertiesForTesting(
@@ -176,7 +174,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(
class LayerTreeHostOcclusionTestOcclusionTwoChildren
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// Add a second child to the root layer and the regions should merge
SetLayerPropertiesForTesting(
root_.get(), NULL, identity_matrix_,
@@ -209,7 +207,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(
class LayerTreeHostOcclusionTestOcclusionMask
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer has a mask on it, then it shouldn't contribute to
// occlusion on stuff below it.
SetLayerPropertiesForTesting(
@@ -242,7 +240,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestOcclusionMask);
class LayerTreeHostOcclusionTestOcclusionMaskBelowOcclusion
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer with a mask is below child2, then child2 should
// contribute to occlusion on everything, and child shouldn't contribute
// to the root_.
@@ -278,7 +276,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(
class LayerTreeHostOcclusionTestOcclusionOpacity
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer has a non-opaque opacity, then it shouldn't
// contribute to occlusion on stuff below it
SetLayerPropertiesForTesting(
@@ -311,7 +309,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestOcclusionOpacity);
class LayerTreeHostOcclusionTestOcclusionOpacityBelowOcclusion
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer with non-opaque opacity is below child2, then
// child2 should contribute to occlusion on everything, and child shouldn't
// contribute to the root_.
@@ -347,7 +345,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(
class LayerTreeHostOcclusionTestOcclusionBlending
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer has a blend mode, then it shouldn't
// contribute to occlusion on stuff below it
SetLayerPropertiesForTesting(
@@ -380,7 +378,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestOcclusionBlending);
class LayerTreeHostOcclusionTestOcclusionBlendingBelowOcclusion
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer with a blend mode is below child2, then
// child2 should contribute to occlusion on everything, and child shouldn't
// contribute to the root_.
@@ -415,7 +413,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(
class LayerTreeHostOcclusionTestOcclusionOpacityFilter
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
FilterOperations filters;
filters.Append(FilterOperation::CreateOpacityFilter(0.5f));
@@ -467,7 +465,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(
class LayerTreeHostOcclusionTestOcclusionBlurFilter
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
gfx::Transform child_transform;
child_transform.Translate(250.0, 250.0);
child_transform.Rotate(90.0);
@@ -511,7 +509,7 @@ class LayerTreeHostOcclusionTestOcclusionCopyRequest
public:
static void CopyOutputCallback(scoped_ptr<CopyOutputResult> result) {}
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer has copy request, and is below child2,
// then child should not inherit occlusion from outside its subtree.
// The child layer will still receive occlusion from inside, and
@@ -546,7 +544,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestOcclusionCopyRequest);
class LayerTreeHostOcclusionTestOcclusionReplica
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// If the child layer has copy request, and is below child2,
// then child should not inherit occlusion from outside its subtree.
// The child layer will still receive occlusion from inside, and
@@ -581,7 +579,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestOcclusionReplica);
class LayerTreeHostOcclusionTestManySurfaces
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() override {
+ void SetupTree() override {
// We create enough RenderSurfaces that it will trigger Vector reallocation
// while computing occlusion.
std::vector<scoped_refptr<TestLayer>> layers;
« no previous file with comments | « cc/trees/layer_tree_host_unittest_no_message_loop.cc ('k') | cc/trees/layer_tree_host_unittest_picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698