| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 texture_layer_->SetNeedsDisplay(); | 1210 texture_layer_->SetNeedsDisplay(); |
| 1211 // Force a change to make sure we draw a frame. | 1211 // Force a change to make sure we draw a frame. |
| 1212 solid_layer_->SetBackgroundColor(SK_ColorGRAY); | 1212 solid_layer_->SetBackgroundColor(SK_ColorGRAY); |
| 1213 break; | 1213 break; |
| 1214 case 3: | 1214 case 3: |
| 1215 // Layer shouldn't have been updated. | 1215 // Layer shouldn't have been updated. |
| 1216 EXPECT_EQ(1, prepare_called_); | 1216 EXPECT_EQ(1, prepare_called_); |
| 1217 // So the old mailbox isn't returned yet. | 1217 // So the old mailbox isn't returned yet. |
| 1218 EXPECT_EQ(0, mailbox_returned_); | 1218 EXPECT_EQ(0, mailbox_returned_); |
| 1219 // Make layer visible again. | 1219 // Make layer visible again. |
| 1220 parent_layer_->SetOpacity(1.f); | 1220 parent_layer_->SetOpacity(0.9f); |
| 1221 break; | 1221 break; |
| 1222 case 4: | 1222 case 4: |
| 1223 // Layer should have been updated. | 1223 // Layer should have been updated. |
| 1224 EXPECT_EQ(2, prepare_called_); | 1224 EXPECT_EQ(2, prepare_called_); |
| 1225 // So the old mailbox should have been returned already. | 1225 // So the old mailbox should have been returned already. |
| 1226 EXPECT_EQ(1, mailbox_returned_); | 1226 EXPECT_EQ(1, mailbox_returned_); |
| 1227 texture_layer_->ClearClient(); | 1227 texture_layer_->ClearClient(); |
| 1228 break; | 1228 break; |
| 1229 case 5: | 1229 case 5: |
| 1230 EXPECT_EQ(2, mailbox_returned_); | 1230 EXPECT_EQ(2, mailbox_returned_); |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 int callback_count_; | 1483 int callback_count_; |
| 1484 scoped_refptr<Layer> root_; | 1484 scoped_refptr<Layer> root_; |
| 1485 scoped_refptr<TextureLayer> layer_; | 1485 scoped_refptr<TextureLayer> layer_; |
| 1486 }; | 1486 }; |
| 1487 | 1487 |
| 1488 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( | 1488 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
| 1489 TextureLayerWithMailboxImplThreadDeleted); | 1489 TextureLayerWithMailboxImplThreadDeleted); |
| 1490 | 1490 |
| 1491 } // namespace | 1491 } // namespace |
| 1492 } // namespace cc | 1492 } // namespace cc |
| OLD | NEW |