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;
TestLayer() : Layer() {
SetIsDrawable(true);
}
- virtual ~TestLayer() {}
+ ~TestLayer() override {}
SimpleEnclosedRegion occlusion_;
SimpleEnclosedRegion expected_occlusion_;
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(),
}
protected:
- virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
+ void InitializeSettings(LayerTreeSettings* settings) override {
settings->minimum_occlusion_tracking_size = gfx::Size();
}
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(
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(
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_,
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(
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_.
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(
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_.
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(
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_.
class LayerTreeHostOcclusionTestOcclusionOpacityFilter
: public LayerTreeHostOcclusionTest {
public:
- virtual void SetupTree() OVERRIDE {
+ void SetupTree() override {
FilterOperations filters;
filters.Append(FilterOperation::CreateOpacityFilter(0.5f));
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);
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
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
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;
+ std::vector<scoped_refptr<TestLayer>> layers;
int num_surfaces = 200;
int root_width = 400;
int root_height = 400;