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

Side by Side Diff: cc/CCDamageTrackerTest.cpp

Issue 10916307: Add the ubercomp DelegatedRendererLayer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use OwnPtrVector Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « cc/CCAppendQuadsData.h ('k') | cc/CCDelegatedRendererLayerImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "config.h" 5 #include "config.h"
6 6
7 #include "CCDamageTracker.h" 7 #include "CCDamageTracker.h"
8 8
9 #include "CCGeometryTestUtils.h" 9 #include "CCGeometryTestUtils.h"
10 #include "CCLayerImpl.h" 10 #include "CCLayerImpl.h"
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 TEST_F(CCDamageTrackerTest, verifyDamageForEmptyLayerList) 1089 TEST_F(CCDamageTrackerTest, verifyDamageForEmptyLayerList)
1090 { 1090 {
1091 // Though it should never happen, its a good idea to verify that the damage tracker 1091 // Though it should never happen, its a good idea to verify that the damage tracker
1092 // does not crash when it receives an empty layerList. 1092 // does not crash when it receives an empty layerList.
1093 1093
1094 OwnPtr<CCLayerImpl> root = CCLayerImpl::create(1); 1094 OwnPtr<CCLayerImpl> root = CCLayerImpl::create(1);
1095 root->createRenderSurface(); 1095 root->createRenderSurface();
1096 1096
1097 ASSERT_TRUE(root == root->renderTarget()); 1097 ASSERT_TRUE(root == root->renderTarget());
1098 CCRenderSurface* targetSurface = root->renderSurface(); 1098 CCRenderSurface* targetSurface = root->renderSurface();
1099 targetSurface->clearLayerList(); 1099 targetSurface->clearLayerLists();
1100 targetSurface->damageTracker()->updateDamageTrackingState(targetSurface->lay erList(), targetSurface->owningLayerId(), false, IntRect(), 0, WebFilterOperatio ns()); 1100 targetSurface->damageTracker()->updateDamageTrackingState(targetSurface->lay erList(), targetSurface->owningLayerId(), false, IntRect(), 0, WebFilterOperatio ns());
1101 1101
1102 FloatRect damageRect = targetSurface->damageTracker()->currentDamageRect(); 1102 FloatRect damageRect = targetSurface->damageTracker()->currentDamageRect();
1103 EXPECT_TRUE(damageRect.isEmpty()); 1103 EXPECT_TRUE(damageRect.isEmpty());
1104 } 1104 }
1105 1105
1106 TEST_F(CCDamageTrackerTest, verifyDamageAccumulatesUntilReset) 1106 TEST_F(CCDamageTrackerTest, verifyDamageAccumulatesUntilReset)
1107 { 1107 {
1108 // If damage is not cleared, it should accumulate. 1108 // If damage is not cleared, it should accumulate.
1109 1109
(...skipping 19 matching lines...) Expand all
1129 rootDamageRect = root->renderSurface()->damageTracker()->currentDamageRect() ; 1129 rootDamageRect = root->renderSurface()->damageTracker()->currentDamageRect() ;
1130 EXPECT_TRUE(rootDamageRect.isEmpty()); 1130 EXPECT_TRUE(rootDamageRect.isEmpty());
1131 1131
1132 // Damage should remain empty even after one frame, since there's yet no new damage 1132 // Damage should remain empty even after one frame, since there's yet no new damage
1133 emulateDrawingOneFrame(root.get()); 1133 emulateDrawingOneFrame(root.get());
1134 rootDamageRect = root->renderSurface()->damageTracker()->currentDamageRect() ; 1134 rootDamageRect = root->renderSurface()->damageTracker()->currentDamageRect() ;
1135 EXPECT_TRUE(rootDamageRect.isEmpty()); 1135 EXPECT_TRUE(rootDamageRect.isEmpty());
1136 } 1136 }
1137 1137
1138 } // namespace 1138 } // namespace
OLDNEW
« no previous file with comments | « cc/CCAppendQuadsData.h ('k') | cc/CCDelegatedRendererLayerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698