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

Side by Side Diff: cc/layers/texture_layer_unittest.cc

Issue 1973503004: [NOT FOR REVIEW] Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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();
jaydasika 2016/05/11 22:52:55 This makes texture_layer's draws_content = false.
1228 break; 1228 break;
1229 case 5: 1229 case 5:
1230 EXPECT_EQ(2, mailbox_returned_); 1230 EXPECT_EQ(2, mailbox_returned_);
1231 EndTest(); 1231 EndTest();
1232 break; 1232 break;
1233 default: 1233 default:
1234 NOTREACHED(); 1234 NOTREACHED();
1235 break; 1235 break;
1236 } 1236 }
1237 } 1237 }
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698