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

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

Issue 2678903003: cc: Clean up naming of paint-related identifiers (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "cc/layers/heads_up_display_layer.h" 9 #include "cc/layers/heads_up_display_layer.h"
10 #include "cc/layers/layer_impl.h" 10 #include "cc/layers/layer_impl.h"
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 // This test uses PictureLayer to check for a working context. 603 // This test uses PictureLayer to check for a working context.
604 class LayerTreeHostContextTestLostContextSucceedsWithContent 604 class LayerTreeHostContextTestLostContextSucceedsWithContent
605 : public LayerTreeHostContextTestLostContextSucceeds { 605 : public LayerTreeHostContextTestLostContextSucceeds {
606 public: 606 public:
607 void SetupTree() override { 607 void SetupTree() override {
608 root_ = Layer::Create(); 608 root_ = Layer::Create();
609 root_->SetBounds(gfx::Size(10, 10)); 609 root_->SetBounds(gfx::Size(10, 10));
610 root_->SetIsDrawable(true); 610 root_->SetIsDrawable(true);
611 611
612 // Paint non-solid color. 612 // Paint non-solid color.
613 PaintFlags paint; 613 PaintFlags flags;
614 paint.setColor(SkColorSetARGB(100, 80, 200, 200)); 614 flags.setColor(SkColorSetARGB(100, 80, 200, 200));
615 client_.add_draw_rect(gfx::Rect(5, 5), paint); 615 client_.add_draw_rect(gfx::Rect(5, 5), flags);
616 616
617 layer_ = FakePictureLayer::Create(&client_); 617 layer_ = FakePictureLayer::Create(&client_);
618 layer_->SetBounds(gfx::Size(10, 10)); 618 layer_->SetBounds(gfx::Size(10, 10));
619 layer_->SetIsDrawable(true); 619 layer_->SetIsDrawable(true);
620 620
621 root_->AddChild(layer_); 621 root_->AddChild(layer_);
622 622
623 layer_tree_host()->SetRootLayer(root_); 623 layer_tree_host()->SetRootLayer(root_);
624 LayerTreeHostContextTest::SetupTree(); 624 LayerTreeHostContextTest::SetupTree();
625 client_.set_bounds(root_->bounds()); 625 client_.set_bounds(root_->bounds());
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 : public LayerTreeHostContextTest { 682 : public LayerTreeHostContextTest {
683 public: 683 public:
684 LayerTreeHostContextTestLostContextAndEvictTextures() 684 LayerTreeHostContextTestLostContextAndEvictTextures()
685 : LayerTreeHostContextTest(), 685 : LayerTreeHostContextTest(),
686 impl_host_(0), 686 impl_host_(0),
687 num_commits_(0), 687 num_commits_(0),
688 lost_context_(false) {} 688 lost_context_(false) {}
689 689
690 void SetupTree() override { 690 void SetupTree() override {
691 // Paint non-solid color. 691 // Paint non-solid color.
692 PaintFlags paint; 692 PaintFlags flags;
693 paint.setColor(SkColorSetARGB(100, 80, 200, 200)); 693 flags.setColor(SkColorSetARGB(100, 80, 200, 200));
694 client_.add_draw_rect(gfx::Rect(5, 5), paint); 694 client_.add_draw_rect(gfx::Rect(5, 5), flags);
695 695
696 scoped_refptr<FakePictureLayer> picture_layer = 696 scoped_refptr<FakePictureLayer> picture_layer =
697 FakePictureLayer::Create(&client_); 697 FakePictureLayer::Create(&client_);
698 picture_layer->SetBounds(gfx::Size(10, 20)); 698 picture_layer->SetBounds(gfx::Size(10, 20));
699 client_.set_bounds(picture_layer->bounds()); 699 client_.set_bounds(picture_layer->bounds());
700 layer_tree_host()->SetRootLayer(picture_layer); 700 layer_tree_host()->SetRootLayer(picture_layer);
701 701
702 LayerTreeHostContextTest::SetupTree(); 702 LayerTreeHostContextTest::SetupTree();
703 } 703 }
704 704
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
1596 SINGLE_AND_MULTI_THREAD_TEST_F( 1596 SINGLE_AND_MULTI_THREAD_TEST_F(
1597 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame); 1597 LayerTreeHostContextTestLoseAfterSendingBeginMainFrame);
1598 1598
1599 // This test causes context loss on the worker context but not the compositor 1599 // This test causes context loss on the worker context but not the compositor
1600 // context and checks that draw still occurs. The resources might be in a bad 1600 // context and checks that draw still occurs. The resources might be in a bad
1601 // state e.g. null sync tokens but that shouldn't cause the draw to fail. 1601 // state e.g. null sync tokens but that shouldn't cause the draw to fail.
1602 class LayerTreeHostContextTestLoseWorkerContextDuringPrepareTiles 1602 class LayerTreeHostContextTestLoseWorkerContextDuringPrepareTiles
1603 : public LayerTreeTest { 1603 : public LayerTreeTest {
1604 protected: 1604 protected:
1605 void SetupTree() override { 1605 void SetupTree() override {
1606 PaintFlags paint; 1606 PaintFlags flags;
1607 client_.set_fill_with_nonsolid_color(true); 1607 client_.set_fill_with_nonsolid_color(true);
1608 client_.add_draw_rect(gfx::Rect(5, 5), paint); 1608 client_.add_draw_rect(gfx::Rect(5, 5), flags);
1609 1609
1610 scoped_refptr<FakePictureLayer> picture_layer = 1610 scoped_refptr<FakePictureLayer> picture_layer =
1611 FakePictureLayer::Create(&client_); 1611 FakePictureLayer::Create(&client_);
1612 picture_layer->SetBounds(gfx::Size(10, 20)); 1612 picture_layer->SetBounds(gfx::Size(10, 20));
1613 client_.set_bounds(picture_layer->bounds()); 1613 client_.set_bounds(picture_layer->bounds());
1614 layer_tree_host()->SetRootLayer(picture_layer); 1614 layer_tree_host()->SetRootLayer(picture_layer);
1615 1615
1616 LayerTreeTest::SetupTree(); 1616 LayerTreeTest::SetupTree();
1617 } 1617 }
1618 1618
(...skipping 17 matching lines...) Expand all
1636 1636
1637 FakeContentLayerClient client_; 1637 FakeContentLayerClient client_;
1638 int num_draws_ = 0; 1638 int num_draws_ = 0;
1639 }; 1639 };
1640 1640
1641 MULTI_THREAD_TEST_F( 1641 MULTI_THREAD_TEST_F(
1642 LayerTreeHostContextTestLoseWorkerContextDuringPrepareTiles); 1642 LayerTreeHostContextTestLoseWorkerContextDuringPrepareTiles);
1643 1643
1644 } // namespace 1644 } // namespace
1645 } // namespace cc 1645 } // namespace cc
OLDNEW
« cc/layers/layer.h ('K') | « cc/trees/layer_tree_host_pixeltest_tiles.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698