OLD | NEW |
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 "cc/layers/texture_layer.h" | 5 #include "cc/layers/texture_layer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 MOCK_METHOD0(StopRateLimiter, void()); | 61 MOCK_METHOD0(StopRateLimiter, void()); |
62 }; | 62 }; |
63 | 63 |
64 class FakeTextureLayerClient : public TextureLayerClient { | 64 class FakeTextureLayerClient : public TextureLayerClient { |
65 public: | 65 public: |
66 FakeTextureLayerClient() : mailbox_changed_(true) {} | 66 FakeTextureLayerClient() : mailbox_changed_(true) {} |
67 | 67 |
68 virtual bool PrepareTextureMailbox( | 68 virtual bool PrepareTextureMailbox( |
69 TextureMailbox* mailbox, | 69 TextureMailbox* mailbox, |
70 scoped_ptr<SingleReleaseCallback>* release_callback, | 70 scoped_ptr<SingleReleaseCallback>* release_callback, |
71 bool use_shared_memory) OVERRIDE { | 71 bool use_shared_memory) override { |
72 if (!mailbox_changed_) | 72 if (!mailbox_changed_) |
73 return false; | 73 return false; |
74 | 74 |
75 *mailbox = mailbox_; | 75 *mailbox = mailbox_; |
76 *release_callback = release_callback_.Pass(); | 76 *release_callback = release_callback_.Pass(); |
77 mailbox_changed_ = false; | 77 mailbox_changed_ = false; |
78 return true; | 78 return true; |
79 } | 79 } |
80 | 80 |
81 void set_mailbox(const TextureMailbox& mailbox, | 81 void set_mailbox(const TextureMailbox& mailbox, |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 EXPECT_EQ(true, main_thread_.CalledOnValidThread()); | 714 EXPECT_EQ(true, main_thread_.CalledOnValidThread()); |
715 scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create( | 715 scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create( |
716 base::Bind( | 716 base::Bind( |
717 &TextureLayerImplWithMailboxThreadedCallback::ReleaseCallback, | 717 &TextureLayerImplWithMailboxThreadedCallback::ReleaseCallback, |
718 base::Unretained(this))); | 718 base::Unretained(this))); |
719 layer_->SetTextureMailbox( | 719 layer_->SetTextureMailbox( |
720 TextureMailbox(MailboxFromChar(mailbox_char), GL_TEXTURE_2D, 0), | 720 TextureMailbox(MailboxFromChar(mailbox_char), GL_TEXTURE_2D, 0), |
721 callback.Pass()); | 721 callback.Pass()); |
722 } | 722 } |
723 | 723 |
724 virtual void BeginTest() OVERRIDE { | 724 virtual void BeginTest() override { |
725 EXPECT_EQ(true, main_thread_.CalledOnValidThread()); | 725 EXPECT_EQ(true, main_thread_.CalledOnValidThread()); |
726 | 726 |
727 gfx::Size bounds(100, 100); | 727 gfx::Size bounds(100, 100); |
728 root_ = Layer::Create(); | 728 root_ = Layer::Create(); |
729 root_->SetBounds(bounds); | 729 root_->SetBounds(bounds); |
730 | 730 |
731 layer_ = TextureLayer::CreateForMailbox(NULL); | 731 layer_ = TextureLayer::CreateForMailbox(NULL); |
732 layer_->SetIsDrawable(true); | 732 layer_->SetIsDrawable(true); |
733 layer_->SetBounds(bounds); | 733 layer_->SetBounds(bounds); |
734 | 734 |
735 root_->AddChild(layer_); | 735 root_->AddChild(layer_); |
736 layer_tree_host()->SetRootLayer(root_); | 736 layer_tree_host()->SetRootLayer(root_); |
737 layer_tree_host()->SetViewportSize(bounds); | 737 layer_tree_host()->SetViewportSize(bounds); |
738 SetMailbox('1'); | 738 SetMailbox('1'); |
739 EXPECT_EQ(0, callback_count_); | 739 EXPECT_EQ(0, callback_count_); |
740 | 740 |
741 // Case #1: change mailbox before the commit. The old mailbox should be | 741 // Case #1: change mailbox before the commit. The old mailbox should be |
742 // released immediately. | 742 // released immediately. |
743 SetMailbox('2'); | 743 SetMailbox('2'); |
744 EXPECT_EQ(1, callback_count_); | 744 EXPECT_EQ(1, callback_count_); |
745 PostSetNeedsCommitToMainThread(); | 745 PostSetNeedsCommitToMainThread(); |
746 } | 746 } |
747 | 747 |
748 virtual void DidCommit() OVERRIDE { | 748 virtual void DidCommit() override { |
749 ++commit_count_; | 749 ++commit_count_; |
750 switch (commit_count_) { | 750 switch (commit_count_) { |
751 case 1: | 751 case 1: |
752 // Case #2: change mailbox after the commit (and draw), where the | 752 // Case #2: change mailbox after the commit (and draw), where the |
753 // layer draws. The old mailbox should be released during the next | 753 // layer draws. The old mailbox should be released during the next |
754 // commit. | 754 // commit. |
755 SetMailbox('3'); | 755 SetMailbox('3'); |
756 EXPECT_EQ(1, callback_count_); | 756 EXPECT_EQ(1, callback_count_); |
757 break; | 757 break; |
758 case 2: | 758 case 2: |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 scoped_ptr<SingleReleaseCallback>()); | 810 scoped_ptr<SingleReleaseCallback>()); |
811 EXPECT_EQ(5, callback_count_); | 811 EXPECT_EQ(5, callback_count_); |
812 EndTest(); | 812 EndTest(); |
813 break; | 813 break; |
814 default: | 814 default: |
815 NOTREACHED(); | 815 NOTREACHED(); |
816 break; | 816 break; |
817 } | 817 } |
818 } | 818 } |
819 | 819 |
820 virtual void AfterTest() OVERRIDE {} | 820 virtual void AfterTest() override {} |
821 | 821 |
822 private: | 822 private: |
823 base::ThreadChecker main_thread_; | 823 base::ThreadChecker main_thread_; |
824 int callback_count_; | 824 int callback_count_; |
825 int commit_count_; | 825 int commit_count_; |
826 scoped_refptr<Layer> root_; | 826 scoped_refptr<Layer> root_; |
827 scoped_refptr<TextureLayer> layer_; | 827 scoped_refptr<TextureLayer> layer_; |
828 }; | 828 }; |
829 | 829 |
830 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( | 830 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
831 TextureLayerImplWithMailboxThreadedCallback); | 831 TextureLayerImplWithMailboxThreadedCallback); |
832 | 832 |
833 | 833 |
834 class TextureLayerMailboxIsActivatedDuringCommit : public LayerTreeTest { | 834 class TextureLayerMailboxIsActivatedDuringCommit : public LayerTreeTest { |
835 protected: | 835 protected: |
836 TextureLayerMailboxIsActivatedDuringCommit() : activate_count_(0) {} | 836 TextureLayerMailboxIsActivatedDuringCommit() : activate_count_(0) {} |
837 | 837 |
838 static void ReleaseCallback(uint32 sync_point, bool lost_resource) {} | 838 static void ReleaseCallback(uint32 sync_point, bool lost_resource) {} |
839 | 839 |
840 void SetMailbox(char mailbox_char) { | 840 void SetMailbox(char mailbox_char) { |
841 scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create( | 841 scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create( |
842 base::Bind( | 842 base::Bind( |
843 &TextureLayerMailboxIsActivatedDuringCommit::ReleaseCallback)); | 843 &TextureLayerMailboxIsActivatedDuringCommit::ReleaseCallback)); |
844 layer_->SetTextureMailbox( | 844 layer_->SetTextureMailbox( |
845 TextureMailbox(MailboxFromChar(mailbox_char), GL_TEXTURE_2D, 0), | 845 TextureMailbox(MailboxFromChar(mailbox_char), GL_TEXTURE_2D, 0), |
846 callback.Pass()); | 846 callback.Pass()); |
847 } | 847 } |
848 | 848 |
849 virtual void BeginTest() OVERRIDE { | 849 virtual void BeginTest() override { |
850 gfx::Size bounds(100, 100); | 850 gfx::Size bounds(100, 100); |
851 root_ = Layer::Create(); | 851 root_ = Layer::Create(); |
852 root_->SetBounds(bounds); | 852 root_->SetBounds(bounds); |
853 | 853 |
854 layer_ = TextureLayer::CreateForMailbox(NULL); | 854 layer_ = TextureLayer::CreateForMailbox(NULL); |
855 layer_->SetIsDrawable(true); | 855 layer_->SetIsDrawable(true); |
856 layer_->SetBounds(bounds); | 856 layer_->SetBounds(bounds); |
857 | 857 |
858 root_->AddChild(layer_); | 858 root_->AddChild(layer_); |
859 layer_tree_host()->SetRootLayer(root_); | 859 layer_tree_host()->SetRootLayer(root_); |
860 layer_tree_host()->SetViewportSize(bounds); | 860 layer_tree_host()->SetViewportSize(bounds); |
861 SetMailbox('1'); | 861 SetMailbox('1'); |
862 | 862 |
863 PostSetNeedsCommitToMainThread(); | 863 PostSetNeedsCommitToMainThread(); |
864 } | 864 } |
865 | 865 |
866 virtual void WillActivateTreeOnThread(LayerTreeHostImpl* impl) OVERRIDE { | 866 virtual void WillActivateTreeOnThread(LayerTreeHostImpl* impl) override { |
867 ++activate_count_; | 867 ++activate_count_; |
868 } | 868 } |
869 | 869 |
870 virtual void DidCommit() OVERRIDE { | 870 virtual void DidCommit() override { |
871 switch (layer_tree_host()->source_frame_number()) { | 871 switch (layer_tree_host()->source_frame_number()) { |
872 case 1: | 872 case 1: |
873 // The first mailbox has been activated. Set a new mailbox, and | 873 // The first mailbox has been activated. Set a new mailbox, and |
874 // expect the next commit to finish *after* it is activated. | 874 // expect the next commit to finish *after* it is activated. |
875 SetMailbox('2'); | 875 SetMailbox('2'); |
876 break; | 876 break; |
877 case 2: | 877 case 2: |
878 // The second mailbox has been activated. Remove the layer from | 878 // The second mailbox has been activated. Remove the layer from |
879 // the tree to cause another commit/activation. The commit should | 879 // the tree to cause another commit/activation. The commit should |
880 // finish *after* the layer is removed from the active tree. | 880 // finish *after* the layer is removed from the active tree. |
881 layer_->RemoveFromParent(); | 881 layer_->RemoveFromParent(); |
882 break; | 882 break; |
883 case 3: | 883 case 3: |
884 EndTest(); | 884 EndTest(); |
885 break; | 885 break; |
886 } | 886 } |
887 } | 887 } |
888 | 888 |
889 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { | 889 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { |
890 switch (host_impl->active_tree()->source_frame_number()) { | 890 switch (host_impl->active_tree()->source_frame_number()) { |
891 case 0: { | 891 case 0: { |
892 // The activate for the 1st mailbox should have happened before now. | 892 // The activate for the 1st mailbox should have happened before now. |
893 EXPECT_EQ(1, activate_count_); | 893 EXPECT_EQ(1, activate_count_); |
894 break; | 894 break; |
895 } | 895 } |
896 case 1: { | 896 case 1: { |
897 // The activate for the 2nd mailbox should have happened before now. | 897 // The activate for the 2nd mailbox should have happened before now. |
898 EXPECT_EQ(2, activate_count_); | 898 EXPECT_EQ(2, activate_count_); |
899 break; | 899 break; |
900 } | 900 } |
901 case 2: { | 901 case 2: { |
902 // The activate to remove the layer should have happened before now. | 902 // The activate to remove the layer should have happened before now. |
903 EXPECT_EQ(3, activate_count_); | 903 EXPECT_EQ(3, activate_count_); |
904 break; | 904 break; |
905 } | 905 } |
906 case 3: { | 906 case 3: { |
907 NOTREACHED(); | 907 NOTREACHED(); |
908 break; | 908 break; |
909 } | 909 } |
910 } | 910 } |
911 } | 911 } |
912 | 912 |
913 | 913 |
914 virtual void AfterTest() OVERRIDE {} | 914 virtual void AfterTest() override {} |
915 | 915 |
916 int activate_count_; | 916 int activate_count_; |
917 scoped_refptr<Layer> root_; | 917 scoped_refptr<Layer> root_; |
918 scoped_refptr<TextureLayer> layer_; | 918 scoped_refptr<TextureLayer> layer_; |
919 }; | 919 }; |
920 | 920 |
921 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( | 921 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
922 TextureLayerMailboxIsActivatedDuringCommit); | 922 TextureLayerMailboxIsActivatedDuringCommit); |
923 | 923 |
924 class TextureLayerImplWithMailboxTest : public TextureLayerTest { | 924 class TextureLayerImplWithMailboxTest : public TextureLayerTest { |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 // Checks that TextureLayer::Update does not cause an extra commit when setting | 1126 // Checks that TextureLayer::Update does not cause an extra commit when setting |
1127 // the texture mailbox. | 1127 // the texture mailbox. |
1128 class TextureLayerNoExtraCommitForMailboxTest | 1128 class TextureLayerNoExtraCommitForMailboxTest |
1129 : public LayerTreeTest, | 1129 : public LayerTreeTest, |
1130 public TextureLayerClient { | 1130 public TextureLayerClient { |
1131 public: | 1131 public: |
1132 // TextureLayerClient implementation. | 1132 // TextureLayerClient implementation. |
1133 virtual bool PrepareTextureMailbox( | 1133 virtual bool PrepareTextureMailbox( |
1134 TextureMailbox* texture_mailbox, | 1134 TextureMailbox* texture_mailbox, |
1135 scoped_ptr<SingleReleaseCallback>* release_callback, | 1135 scoped_ptr<SingleReleaseCallback>* release_callback, |
1136 bool use_shared_memory) OVERRIDE { | 1136 bool use_shared_memory) override { |
1137 if (layer_tree_host()->source_frame_number() == 1) { | 1137 if (layer_tree_host()->source_frame_number() == 1) { |
1138 // Once this has been committed, the mailbox will be released. | 1138 // Once this has been committed, the mailbox will be released. |
1139 *texture_mailbox = TextureMailbox(); | 1139 *texture_mailbox = TextureMailbox(); |
1140 return true; | 1140 return true; |
1141 } | 1141 } |
1142 | 1142 |
1143 *texture_mailbox = TextureMailbox(MailboxFromChar('1'), GL_TEXTURE_2D, 0); | 1143 *texture_mailbox = TextureMailbox(MailboxFromChar('1'), GL_TEXTURE_2D, 0); |
1144 *release_callback = SingleReleaseCallback::Create( | 1144 *release_callback = SingleReleaseCallback::Create( |
1145 base::Bind(&TextureLayerNoExtraCommitForMailboxTest::MailboxReleased, | 1145 base::Bind(&TextureLayerNoExtraCommitForMailboxTest::MailboxReleased, |
1146 base::Unretained(this))); | 1146 base::Unretained(this))); |
1147 return true; | 1147 return true; |
1148 } | 1148 } |
1149 | 1149 |
1150 void MailboxReleased(uint32 sync_point, bool lost_resource) { | 1150 void MailboxReleased(uint32 sync_point, bool lost_resource) { |
1151 // Source frame number during callback is the same as the source frame | 1151 // Source frame number during callback is the same as the source frame |
1152 // on which it was released. | 1152 // on which it was released. |
1153 EXPECT_EQ(1, layer_tree_host()->source_frame_number()); | 1153 EXPECT_EQ(1, layer_tree_host()->source_frame_number()); |
1154 EndTest(); | 1154 EndTest(); |
1155 } | 1155 } |
1156 | 1156 |
1157 virtual void SetupTree() OVERRIDE { | 1157 virtual void SetupTree() override { |
1158 scoped_refptr<Layer> root = Layer::Create(); | 1158 scoped_refptr<Layer> root = Layer::Create(); |
1159 root->SetBounds(gfx::Size(10, 10)); | 1159 root->SetBounds(gfx::Size(10, 10)); |
1160 root->SetIsDrawable(true); | 1160 root->SetIsDrawable(true); |
1161 | 1161 |
1162 texture_layer_ = TextureLayer::CreateForMailbox(this); | 1162 texture_layer_ = TextureLayer::CreateForMailbox(this); |
1163 texture_layer_->SetBounds(gfx::Size(10, 10)); | 1163 texture_layer_->SetBounds(gfx::Size(10, 10)); |
1164 texture_layer_->SetIsDrawable(true); | 1164 texture_layer_->SetIsDrawable(true); |
1165 root->AddChild(texture_layer_); | 1165 root->AddChild(texture_layer_); |
1166 | 1166 |
1167 layer_tree_host()->SetRootLayer(root); | 1167 layer_tree_host()->SetRootLayer(root); |
1168 LayerTreeTest::SetupTree(); | 1168 LayerTreeTest::SetupTree(); |
1169 } | 1169 } |
1170 | 1170 |
1171 virtual void BeginTest() OVERRIDE { | 1171 virtual void BeginTest() override { |
1172 PostSetNeedsCommitToMainThread(); | 1172 PostSetNeedsCommitToMainThread(); |
1173 } | 1173 } |
1174 | 1174 |
1175 virtual void DidCommitAndDrawFrame() OVERRIDE { | 1175 virtual void DidCommitAndDrawFrame() override { |
1176 switch (layer_tree_host()->source_frame_number()) { | 1176 switch (layer_tree_host()->source_frame_number()) { |
1177 case 1: | 1177 case 1: |
1178 EXPECT_FALSE(proxy()->MainFrameWillHappenForTesting()); | 1178 EXPECT_FALSE(proxy()->MainFrameWillHappenForTesting()); |
1179 // Invalidate the texture layer to clear the mailbox before | 1179 // Invalidate the texture layer to clear the mailbox before |
1180 // ending the test. | 1180 // ending the test. |
1181 texture_layer_->SetNeedsDisplay(); | 1181 texture_layer_->SetNeedsDisplay(); |
1182 break; | 1182 break; |
1183 case 2: | 1183 case 2: |
1184 break; | 1184 break; |
1185 default: | 1185 default: |
1186 NOTREACHED(); | 1186 NOTREACHED(); |
1187 break; | 1187 break; |
1188 } | 1188 } |
1189 } | 1189 } |
1190 | 1190 |
1191 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, | 1191 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, |
1192 bool result) OVERRIDE { | 1192 bool result) override { |
1193 ASSERT_TRUE(result); | 1193 ASSERT_TRUE(result); |
1194 DelegatedFrameData* delegated_frame_data = | 1194 DelegatedFrameData* delegated_frame_data = |
1195 output_surface()->last_sent_frame().delegated_frame_data.get(); | 1195 output_surface()->last_sent_frame().delegated_frame_data.get(); |
1196 if (!delegated_frame_data) | 1196 if (!delegated_frame_data) |
1197 return; | 1197 return; |
1198 | 1198 |
1199 // Return all resources immediately. | 1199 // Return all resources immediately. |
1200 TransferableResourceArray resources_to_return = | 1200 TransferableResourceArray resources_to_return = |
1201 output_surface()->resources_held_by_parent(); | 1201 output_surface()->resources_held_by_parent(); |
1202 | 1202 |
1203 CompositorFrameAck ack; | 1203 CompositorFrameAck ack; |
1204 for (size_t i = 0; i < resources_to_return.size(); ++i) | 1204 for (size_t i = 0; i < resources_to_return.size(); ++i) |
1205 output_surface()->ReturnResource(resources_to_return[i].id, &ack); | 1205 output_surface()->ReturnResource(resources_to_return[i].id, &ack); |
1206 host_impl->ReclaimResources(&ack); | 1206 host_impl->ReclaimResources(&ack); |
1207 } | 1207 } |
1208 | 1208 |
1209 virtual void AfterTest() OVERRIDE {} | 1209 virtual void AfterTest() override {} |
1210 | 1210 |
1211 private: | 1211 private: |
1212 scoped_refptr<TextureLayer> texture_layer_; | 1212 scoped_refptr<TextureLayer> texture_layer_; |
1213 }; | 1213 }; |
1214 | 1214 |
1215 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerNoExtraCommitForMailboxTest); | 1215 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerNoExtraCommitForMailboxTest); |
1216 | 1216 |
1217 // Checks that changing a mailbox in the client for a TextureLayer that's | 1217 // Checks that changing a mailbox in the client for a TextureLayer that's |
1218 // invisible correctly works and uses the new mailbox as soon as the layer | 1218 // invisible correctly works and uses the new mailbox as soon as the layer |
1219 // becomes visible (and returns the old one). | 1219 // becomes visible (and returns the old one). |
1220 class TextureLayerChangeInvisibleMailboxTest | 1220 class TextureLayerChangeInvisibleMailboxTest |
1221 : public LayerTreeTest, | 1221 : public LayerTreeTest, |
1222 public TextureLayerClient { | 1222 public TextureLayerClient { |
1223 public: | 1223 public: |
1224 TextureLayerChangeInvisibleMailboxTest() | 1224 TextureLayerChangeInvisibleMailboxTest() |
1225 : mailbox_changed_(true), | 1225 : mailbox_changed_(true), |
1226 mailbox_returned_(0), | 1226 mailbox_returned_(0), |
1227 prepare_called_(0), | 1227 prepare_called_(0), |
1228 commit_count_(0) { | 1228 commit_count_(0) { |
1229 mailbox_ = MakeMailbox('1'); | 1229 mailbox_ = MakeMailbox('1'); |
1230 } | 1230 } |
1231 | 1231 |
1232 // TextureLayerClient implementation. | 1232 // TextureLayerClient implementation. |
1233 virtual bool PrepareTextureMailbox( | 1233 virtual bool PrepareTextureMailbox( |
1234 TextureMailbox* mailbox, | 1234 TextureMailbox* mailbox, |
1235 scoped_ptr<SingleReleaseCallback>* release_callback, | 1235 scoped_ptr<SingleReleaseCallback>* release_callback, |
1236 bool use_shared_memory) OVERRIDE { | 1236 bool use_shared_memory) override { |
1237 ++prepare_called_; | 1237 ++prepare_called_; |
1238 if (!mailbox_changed_) | 1238 if (!mailbox_changed_) |
1239 return false; | 1239 return false; |
1240 *mailbox = mailbox_; | 1240 *mailbox = mailbox_; |
1241 *release_callback = SingleReleaseCallback::Create( | 1241 *release_callback = SingleReleaseCallback::Create( |
1242 base::Bind(&TextureLayerChangeInvisibleMailboxTest::MailboxReleased, | 1242 base::Bind(&TextureLayerChangeInvisibleMailboxTest::MailboxReleased, |
1243 base::Unretained(this))); | 1243 base::Unretained(this))); |
1244 return true; | 1244 return true; |
1245 } | 1245 } |
1246 | 1246 |
1247 TextureMailbox MakeMailbox(char name) { | 1247 TextureMailbox MakeMailbox(char name) { |
1248 return TextureMailbox(MailboxFromChar(name), GL_TEXTURE_2D, 0); | 1248 return TextureMailbox(MailboxFromChar(name), GL_TEXTURE_2D, 0); |
1249 } | 1249 } |
1250 | 1250 |
1251 void MailboxReleased(uint32 sync_point, bool lost_resource) { | 1251 void MailboxReleased(uint32 sync_point, bool lost_resource) { |
1252 ++mailbox_returned_; | 1252 ++mailbox_returned_; |
1253 } | 1253 } |
1254 | 1254 |
1255 virtual void SetupTree() OVERRIDE { | 1255 virtual void SetupTree() override { |
1256 scoped_refptr<Layer> root = Layer::Create(); | 1256 scoped_refptr<Layer> root = Layer::Create(); |
1257 root->SetBounds(gfx::Size(10, 10)); | 1257 root->SetBounds(gfx::Size(10, 10)); |
1258 root->SetIsDrawable(true); | 1258 root->SetIsDrawable(true); |
1259 | 1259 |
1260 solid_layer_ = SolidColorLayer::Create(); | 1260 solid_layer_ = SolidColorLayer::Create(); |
1261 solid_layer_->SetBounds(gfx::Size(10, 10)); | 1261 solid_layer_->SetBounds(gfx::Size(10, 10)); |
1262 solid_layer_->SetIsDrawable(true); | 1262 solid_layer_->SetIsDrawable(true); |
1263 solid_layer_->SetBackgroundColor(SK_ColorWHITE); | 1263 solid_layer_->SetBackgroundColor(SK_ColorWHITE); |
1264 root->AddChild(solid_layer_); | 1264 root->AddChild(solid_layer_); |
1265 | 1265 |
1266 parent_layer_ = Layer::Create(); | 1266 parent_layer_ = Layer::Create(); |
1267 parent_layer_->SetBounds(gfx::Size(10, 10)); | 1267 parent_layer_->SetBounds(gfx::Size(10, 10)); |
1268 parent_layer_->SetIsDrawable(true); | 1268 parent_layer_->SetIsDrawable(true); |
1269 root->AddChild(parent_layer_); | 1269 root->AddChild(parent_layer_); |
1270 | 1270 |
1271 texture_layer_ = TextureLayer::CreateForMailbox(this); | 1271 texture_layer_ = TextureLayer::CreateForMailbox(this); |
1272 texture_layer_->SetBounds(gfx::Size(10, 10)); | 1272 texture_layer_->SetBounds(gfx::Size(10, 10)); |
1273 texture_layer_->SetIsDrawable(true); | 1273 texture_layer_->SetIsDrawable(true); |
1274 parent_layer_->AddChild(texture_layer_); | 1274 parent_layer_->AddChild(texture_layer_); |
1275 | 1275 |
1276 layer_tree_host()->SetRootLayer(root); | 1276 layer_tree_host()->SetRootLayer(root); |
1277 LayerTreeTest::SetupTree(); | 1277 LayerTreeTest::SetupTree(); |
1278 } | 1278 } |
1279 | 1279 |
1280 virtual void BeginTest() OVERRIDE { | 1280 virtual void BeginTest() override { |
1281 PostSetNeedsCommitToMainThread(); | 1281 PostSetNeedsCommitToMainThread(); |
1282 } | 1282 } |
1283 | 1283 |
1284 virtual void DidCommitAndDrawFrame() OVERRIDE { | 1284 virtual void DidCommitAndDrawFrame() override { |
1285 ++commit_count_; | 1285 ++commit_count_; |
1286 switch (commit_count_) { | 1286 switch (commit_count_) { |
1287 case 1: | 1287 case 1: |
1288 // We should have updated the layer, committing the texture. | 1288 // We should have updated the layer, committing the texture. |
1289 EXPECT_EQ(1, prepare_called_); | 1289 EXPECT_EQ(1, prepare_called_); |
1290 // Make layer invisible. | 1290 // Make layer invisible. |
1291 parent_layer_->SetOpacity(0.f); | 1291 parent_layer_->SetOpacity(0.f); |
1292 break; | 1292 break; |
1293 case 2: | 1293 case 2: |
1294 // Layer shouldn't have been updated. | 1294 // Layer shouldn't have been updated. |
(...skipping 24 matching lines...) Expand all Loading... |
1319 EXPECT_EQ(2, mailbox_returned_); | 1319 EXPECT_EQ(2, mailbox_returned_); |
1320 EndTest(); | 1320 EndTest(); |
1321 break; | 1321 break; |
1322 default: | 1322 default: |
1323 NOTREACHED(); | 1323 NOTREACHED(); |
1324 break; | 1324 break; |
1325 } | 1325 } |
1326 } | 1326 } |
1327 | 1327 |
1328 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, | 1328 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, |
1329 bool result) OVERRIDE { | 1329 bool result) override { |
1330 ASSERT_TRUE(result); | 1330 ASSERT_TRUE(result); |
1331 DelegatedFrameData* delegated_frame_data = | 1331 DelegatedFrameData* delegated_frame_data = |
1332 output_surface()->last_sent_frame().delegated_frame_data.get(); | 1332 output_surface()->last_sent_frame().delegated_frame_data.get(); |
1333 if (!delegated_frame_data) | 1333 if (!delegated_frame_data) |
1334 return; | 1334 return; |
1335 | 1335 |
1336 // Return all resources immediately. | 1336 // Return all resources immediately. |
1337 TransferableResourceArray resources_to_return = | 1337 TransferableResourceArray resources_to_return = |
1338 output_surface()->resources_held_by_parent(); | 1338 output_surface()->resources_held_by_parent(); |
1339 | 1339 |
1340 CompositorFrameAck ack; | 1340 CompositorFrameAck ack; |
1341 for (size_t i = 0; i < resources_to_return.size(); ++i) | 1341 for (size_t i = 0; i < resources_to_return.size(); ++i) |
1342 output_surface()->ReturnResource(resources_to_return[i].id, &ack); | 1342 output_surface()->ReturnResource(resources_to_return[i].id, &ack); |
1343 host_impl->ReclaimResources(&ack); | 1343 host_impl->ReclaimResources(&ack); |
1344 } | 1344 } |
1345 | 1345 |
1346 virtual void AfterTest() OVERRIDE {} | 1346 virtual void AfterTest() override {} |
1347 | 1347 |
1348 private: | 1348 private: |
1349 scoped_refptr<SolidColorLayer> solid_layer_; | 1349 scoped_refptr<SolidColorLayer> solid_layer_; |
1350 scoped_refptr<Layer> parent_layer_; | 1350 scoped_refptr<Layer> parent_layer_; |
1351 scoped_refptr<TextureLayer> texture_layer_; | 1351 scoped_refptr<TextureLayer> texture_layer_; |
1352 | 1352 |
1353 // Used on the main thread. | 1353 // Used on the main thread. |
1354 bool mailbox_changed_; | 1354 bool mailbox_changed_; |
1355 TextureMailbox mailbox_; | 1355 TextureMailbox mailbox_; |
1356 int mailbox_returned_; | 1356 int mailbox_returned_; |
1357 int prepare_called_; | 1357 int prepare_called_; |
1358 int commit_count_; | 1358 int commit_count_; |
1359 }; | 1359 }; |
1360 | 1360 |
1361 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerChangeInvisibleMailboxTest); | 1361 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerChangeInvisibleMailboxTest); |
1362 | 1362 |
1363 // Test that TextureLayerImpl::ReleaseResources can be called which releases | 1363 // Test that TextureLayerImpl::ReleaseResources can be called which releases |
1364 // the mailbox back to TextureLayerClient. | 1364 // the mailbox back to TextureLayerClient. |
1365 class TextureLayerReleaseResourcesBase | 1365 class TextureLayerReleaseResourcesBase |
1366 : public LayerTreeTest, | 1366 : public LayerTreeTest, |
1367 public TextureLayerClient { | 1367 public TextureLayerClient { |
1368 public: | 1368 public: |
1369 // TextureLayerClient implementation. | 1369 // TextureLayerClient implementation. |
1370 virtual bool PrepareTextureMailbox( | 1370 virtual bool PrepareTextureMailbox( |
1371 TextureMailbox* mailbox, | 1371 TextureMailbox* mailbox, |
1372 scoped_ptr<SingleReleaseCallback>* release_callback, | 1372 scoped_ptr<SingleReleaseCallback>* release_callback, |
1373 bool use_shared_memory) OVERRIDE { | 1373 bool use_shared_memory) override { |
1374 *mailbox = TextureMailbox(MailboxFromChar('1'), GL_TEXTURE_2D, 0); | 1374 *mailbox = TextureMailbox(MailboxFromChar('1'), GL_TEXTURE_2D, 0); |
1375 *release_callback = SingleReleaseCallback::Create( | 1375 *release_callback = SingleReleaseCallback::Create( |
1376 base::Bind(&TextureLayerReleaseResourcesBase::MailboxReleased, | 1376 base::Bind(&TextureLayerReleaseResourcesBase::MailboxReleased, |
1377 base::Unretained(this))); | 1377 base::Unretained(this))); |
1378 return true; | 1378 return true; |
1379 } | 1379 } |
1380 | 1380 |
1381 void MailboxReleased(unsigned sync_point, bool lost_resource) { | 1381 void MailboxReleased(unsigned sync_point, bool lost_resource) { |
1382 mailbox_released_ = true; | 1382 mailbox_released_ = true; |
1383 } | 1383 } |
1384 | 1384 |
1385 virtual void SetupTree() OVERRIDE { | 1385 virtual void SetupTree() override { |
1386 LayerTreeTest::SetupTree(); | 1386 LayerTreeTest::SetupTree(); |
1387 | 1387 |
1388 scoped_refptr<TextureLayer> texture_layer = | 1388 scoped_refptr<TextureLayer> texture_layer = |
1389 TextureLayer::CreateForMailbox(this); | 1389 TextureLayer::CreateForMailbox(this); |
1390 texture_layer->SetBounds(gfx::Size(10, 10)); | 1390 texture_layer->SetBounds(gfx::Size(10, 10)); |
1391 texture_layer->SetIsDrawable(true); | 1391 texture_layer->SetIsDrawable(true); |
1392 | 1392 |
1393 layer_tree_host()->root_layer()->AddChild(texture_layer); | 1393 layer_tree_host()->root_layer()->AddChild(texture_layer); |
1394 } | 1394 } |
1395 | 1395 |
1396 virtual void BeginTest() OVERRIDE { | 1396 virtual void BeginTest() override { |
1397 mailbox_released_ = false; | 1397 mailbox_released_ = false; |
1398 PostSetNeedsCommitToMainThread(); | 1398 PostSetNeedsCommitToMainThread(); |
1399 } | 1399 } |
1400 | 1400 |
1401 virtual void DidCommitAndDrawFrame() OVERRIDE { | 1401 virtual void DidCommitAndDrawFrame() override { |
1402 EndTest(); | 1402 EndTest(); |
1403 } | 1403 } |
1404 | 1404 |
1405 virtual void AfterTest() OVERRIDE { | 1405 virtual void AfterTest() override { |
1406 EXPECT_TRUE(mailbox_released_); | 1406 EXPECT_TRUE(mailbox_released_); |
1407 } | 1407 } |
1408 | 1408 |
1409 private: | 1409 private: |
1410 bool mailbox_released_; | 1410 bool mailbox_released_; |
1411 }; | 1411 }; |
1412 | 1412 |
1413 class TextureLayerReleaseResourcesAfterCommit | 1413 class TextureLayerReleaseResourcesAfterCommit |
1414 : public TextureLayerReleaseResourcesBase { | 1414 : public TextureLayerReleaseResourcesBase { |
1415 public: | 1415 public: |
1416 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { | 1416 virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { |
1417 LayerTreeImpl* tree = NULL; | 1417 LayerTreeImpl* tree = NULL; |
1418 if (host_impl->settings().impl_side_painting) | 1418 if (host_impl->settings().impl_side_painting) |
1419 tree = host_impl->pending_tree(); | 1419 tree = host_impl->pending_tree(); |
1420 else | 1420 else |
1421 tree = host_impl->active_tree(); | 1421 tree = host_impl->active_tree(); |
1422 tree->root_layer()->children()[0]->ReleaseResources(); | 1422 tree->root_layer()->children()[0]->ReleaseResources(); |
1423 } | 1423 } |
1424 }; | 1424 }; |
1425 | 1425 |
1426 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerReleaseResourcesAfterCommit); | 1426 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerReleaseResourcesAfterCommit); |
1427 | 1427 |
1428 class TextureLayerReleaseResourcesAfterActivate | 1428 class TextureLayerReleaseResourcesAfterActivate |
1429 : public TextureLayerReleaseResourcesBase { | 1429 : public TextureLayerReleaseResourcesBase { |
1430 public: | 1430 public: |
1431 virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { | 1431 virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { |
1432 host_impl->active_tree()->root_layer()->children()[0]->ReleaseResources(); | 1432 host_impl->active_tree()->root_layer()->children()[0]->ReleaseResources(); |
1433 } | 1433 } |
1434 }; | 1434 }; |
1435 | 1435 |
1436 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerReleaseResourcesAfterActivate); | 1436 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerReleaseResourcesAfterActivate); |
1437 | 1437 |
1438 class TextureLayerWithMailboxMainThreadDeleted : public LayerTreeTest { | 1438 class TextureLayerWithMailboxMainThreadDeleted : public LayerTreeTest { |
1439 public: | 1439 public: |
1440 void ReleaseCallback(uint32 sync_point, bool lost_resource) { | 1440 void ReleaseCallback(uint32 sync_point, bool lost_resource) { |
1441 EXPECT_EQ(true, main_thread_.CalledOnValidThread()); | 1441 EXPECT_EQ(true, main_thread_.CalledOnValidThread()); |
1442 EXPECT_FALSE(lost_resource); | 1442 EXPECT_FALSE(lost_resource); |
1443 ++callback_count_; | 1443 ++callback_count_; |
1444 EndTest(); | 1444 EndTest(); |
1445 } | 1445 } |
1446 | 1446 |
1447 void SetMailbox(char mailbox_char) { | 1447 void SetMailbox(char mailbox_char) { |
1448 EXPECT_EQ(true, main_thread_.CalledOnValidThread()); | 1448 EXPECT_EQ(true, main_thread_.CalledOnValidThread()); |
1449 scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create( | 1449 scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create( |
1450 base::Bind( | 1450 base::Bind( |
1451 &TextureLayerWithMailboxMainThreadDeleted::ReleaseCallback, | 1451 &TextureLayerWithMailboxMainThreadDeleted::ReleaseCallback, |
1452 base::Unretained(this))); | 1452 base::Unretained(this))); |
1453 layer_->SetTextureMailbox( | 1453 layer_->SetTextureMailbox( |
1454 TextureMailbox(MailboxFromChar(mailbox_char), GL_TEXTURE_2D, 0), | 1454 TextureMailbox(MailboxFromChar(mailbox_char), GL_TEXTURE_2D, 0), |
1455 callback.Pass()); | 1455 callback.Pass()); |
1456 } | 1456 } |
1457 | 1457 |
1458 virtual void SetupTree() OVERRIDE { | 1458 virtual void SetupTree() override { |
1459 gfx::Size bounds(100, 100); | 1459 gfx::Size bounds(100, 100); |
1460 root_ = Layer::Create(); | 1460 root_ = Layer::Create(); |
1461 root_->SetBounds(bounds); | 1461 root_->SetBounds(bounds); |
1462 | 1462 |
1463 layer_ = TextureLayer::CreateForMailbox(NULL); | 1463 layer_ = TextureLayer::CreateForMailbox(NULL); |
1464 layer_->SetIsDrawable(true); | 1464 layer_->SetIsDrawable(true); |
1465 layer_->SetBounds(bounds); | 1465 layer_->SetBounds(bounds); |
1466 | 1466 |
1467 root_->AddChild(layer_); | 1467 root_->AddChild(layer_); |
1468 layer_tree_host()->SetRootLayer(root_); | 1468 layer_tree_host()->SetRootLayer(root_); |
1469 layer_tree_host()->SetViewportSize(bounds); | 1469 layer_tree_host()->SetViewportSize(bounds); |
1470 } | 1470 } |
1471 | 1471 |
1472 virtual void BeginTest() OVERRIDE { | 1472 virtual void BeginTest() override { |
1473 EXPECT_EQ(true, main_thread_.CalledOnValidThread()); | 1473 EXPECT_EQ(true, main_thread_.CalledOnValidThread()); |
1474 | 1474 |
1475 callback_count_ = 0; | 1475 callback_count_ = 0; |
1476 | 1476 |
1477 // Set the mailbox on the main thread. | 1477 // Set the mailbox on the main thread. |
1478 SetMailbox('1'); | 1478 SetMailbox('1'); |
1479 EXPECT_EQ(0, callback_count_); | 1479 EXPECT_EQ(0, callback_count_); |
1480 | 1480 |
1481 PostSetNeedsCommitToMainThread(); | 1481 PostSetNeedsCommitToMainThread(); |
1482 } | 1482 } |
1483 | 1483 |
1484 virtual void DidCommitAndDrawFrame() OVERRIDE { | 1484 virtual void DidCommitAndDrawFrame() override { |
1485 switch (layer_tree_host()->source_frame_number()) { | 1485 switch (layer_tree_host()->source_frame_number()) { |
1486 case 1: | 1486 case 1: |
1487 // Delete the TextureLayer on the main thread while the mailbox is in | 1487 // Delete the TextureLayer on the main thread while the mailbox is in |
1488 // the impl tree. | 1488 // the impl tree. |
1489 layer_->RemoveFromParent(); | 1489 layer_->RemoveFromParent(); |
1490 layer_ = NULL; | 1490 layer_ = NULL; |
1491 break; | 1491 break; |
1492 } | 1492 } |
1493 } | 1493 } |
1494 | 1494 |
1495 virtual void AfterTest() OVERRIDE { | 1495 virtual void AfterTest() override { |
1496 EXPECT_EQ(1, callback_count_); | 1496 EXPECT_EQ(1, callback_count_); |
1497 } | 1497 } |
1498 | 1498 |
1499 private: | 1499 private: |
1500 base::ThreadChecker main_thread_; | 1500 base::ThreadChecker main_thread_; |
1501 int callback_count_; | 1501 int callback_count_; |
1502 scoped_refptr<Layer> root_; | 1502 scoped_refptr<Layer> root_; |
1503 scoped_refptr<TextureLayer> layer_; | 1503 scoped_refptr<TextureLayer> layer_; |
1504 }; | 1504 }; |
1505 | 1505 |
(...skipping 13 matching lines...) Expand all Loading... |
1519 EXPECT_EQ(true, main_thread_.CalledOnValidThread()); | 1519 EXPECT_EQ(true, main_thread_.CalledOnValidThread()); |
1520 scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create( | 1520 scoped_ptr<SingleReleaseCallback> callback = SingleReleaseCallback::Create( |
1521 base::Bind( | 1521 base::Bind( |
1522 &TextureLayerWithMailboxImplThreadDeleted::ReleaseCallback, | 1522 &TextureLayerWithMailboxImplThreadDeleted::ReleaseCallback, |
1523 base::Unretained(this))); | 1523 base::Unretained(this))); |
1524 layer_->SetTextureMailbox( | 1524 layer_->SetTextureMailbox( |
1525 TextureMailbox(MailboxFromChar(mailbox_char), GL_TEXTURE_2D, 0), | 1525 TextureMailbox(MailboxFromChar(mailbox_char), GL_TEXTURE_2D, 0), |
1526 callback.Pass()); | 1526 callback.Pass()); |
1527 } | 1527 } |
1528 | 1528 |
1529 virtual void SetupTree() OVERRIDE { | 1529 virtual void SetupTree() override { |
1530 gfx::Size bounds(100, 100); | 1530 gfx::Size bounds(100, 100); |
1531 root_ = Layer::Create(); | 1531 root_ = Layer::Create(); |
1532 root_->SetBounds(bounds); | 1532 root_->SetBounds(bounds); |
1533 | 1533 |
1534 layer_ = TextureLayer::CreateForMailbox(NULL); | 1534 layer_ = TextureLayer::CreateForMailbox(NULL); |
1535 layer_->SetIsDrawable(true); | 1535 layer_->SetIsDrawable(true); |
1536 layer_->SetBounds(bounds); | 1536 layer_->SetBounds(bounds); |
1537 | 1537 |
1538 root_->AddChild(layer_); | 1538 root_->AddChild(layer_); |
1539 layer_tree_host()->SetRootLayer(root_); | 1539 layer_tree_host()->SetRootLayer(root_); |
1540 layer_tree_host()->SetViewportSize(bounds); | 1540 layer_tree_host()->SetViewportSize(bounds); |
1541 } | 1541 } |
1542 | 1542 |
1543 virtual void BeginTest() OVERRIDE { | 1543 virtual void BeginTest() override { |
1544 EXPECT_EQ(true, main_thread_.CalledOnValidThread()); | 1544 EXPECT_EQ(true, main_thread_.CalledOnValidThread()); |
1545 | 1545 |
1546 callback_count_ = 0; | 1546 callback_count_ = 0; |
1547 | 1547 |
1548 // Set the mailbox on the main thread. | 1548 // Set the mailbox on the main thread. |
1549 SetMailbox('1'); | 1549 SetMailbox('1'); |
1550 EXPECT_EQ(0, callback_count_); | 1550 EXPECT_EQ(0, callback_count_); |
1551 | 1551 |
1552 PostSetNeedsCommitToMainThread(); | 1552 PostSetNeedsCommitToMainThread(); |
1553 } | 1553 } |
1554 | 1554 |
1555 virtual void DidCommitAndDrawFrame() OVERRIDE { | 1555 virtual void DidCommitAndDrawFrame() override { |
1556 switch (layer_tree_host()->source_frame_number()) { | 1556 switch (layer_tree_host()->source_frame_number()) { |
1557 case 1: | 1557 case 1: |
1558 // Remove the TextureLayer on the main thread while the mailbox is in | 1558 // Remove the TextureLayer on the main thread while the mailbox is in |
1559 // the impl tree, but don't delete the TextureLayer until after the impl | 1559 // the impl tree, but don't delete the TextureLayer until after the impl |
1560 // tree side is deleted. | 1560 // tree side is deleted. |
1561 layer_->RemoveFromParent(); | 1561 layer_->RemoveFromParent(); |
1562 break; | 1562 break; |
1563 case 2: | 1563 case 2: |
1564 layer_ = NULL; | 1564 layer_ = NULL; |
1565 break; | 1565 break; |
1566 } | 1566 } |
1567 } | 1567 } |
1568 | 1568 |
1569 virtual void AfterTest() OVERRIDE { | 1569 virtual void AfterTest() override { |
1570 EXPECT_EQ(1, callback_count_); | 1570 EXPECT_EQ(1, callback_count_); |
1571 } | 1571 } |
1572 | 1572 |
1573 private: | 1573 private: |
1574 base::ThreadChecker main_thread_; | 1574 base::ThreadChecker main_thread_; |
1575 int callback_count_; | 1575 int callback_count_; |
1576 scoped_refptr<Layer> root_; | 1576 scoped_refptr<Layer> root_; |
1577 scoped_refptr<TextureLayer> layer_; | 1577 scoped_refptr<TextureLayer> layer_; |
1578 }; | 1578 }; |
1579 | 1579 |
1580 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( | 1580 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
1581 TextureLayerWithMailboxImplThreadDeleted); | 1581 TextureLayerWithMailboxImplThreadDeleted); |
1582 | 1582 |
1583 } // namespace | 1583 } // namespace |
1584 } // namespace cc | 1584 } // namespace cc |
OLD | NEW |