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

Side by Side Diff: cc/CCOcclusionTrackerTest.cpp

Issue 10915313: cc: Apply the layer's initial CSS scale to the contentsScale to render text at the right resolution. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove extra header 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
« cc/CCMathUtil.cpp ('K') | « cc/CCMathUtil.cpp ('k') | 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 "config.h" 5 #include "config.h"
6 6
7 #include "CCOcclusionTracker.h" 7 #include "CCOcclusionTracker.h"
8 8
9 #include "CCAnimationTestCommon.h" 9 #include "CCAnimationTestCommon.h"
10 #include "CCGeometryTestUtils.h" 10 #include "CCGeometryTestUtils.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 } 233 }
234 234
235 void calcDrawEtc(TestContentLayerImpl* root) 235 void calcDrawEtc(TestContentLayerImpl* root)
236 { 236 {
237 ASSERT(root == m_root.get()); 237 ASSERT(root == m_root.get());
238 int dummyMaxTextureSize = 512; 238 int dummyMaxTextureSize = 512;
239 CCLayerSorter layerSorter; 239 CCLayerSorter layerSorter;
240 240
241 ASSERT(!root->renderSurface()); 241 ASSERT(!root->renderSurface());
242 242
243 CCLayerTreeHostCommon::calculateDrawTransforms(root, root->bounds(), 1, &layerSorter, dummyMaxTextureSize, m_renderSurfaceLayerListImpl); 243 CCLayerTreeHostCommon::calculateDrawTransforms(root, root->bounds(), 1, 1, &layerSorter, dummyMaxTextureSize, m_renderSurfaceLayerListImpl);
244 CCLayerTreeHostCommon::calculateVisibleRects(m_renderSurfaceLayerListImp l); 244 CCLayerTreeHostCommon::calculateVisibleRects(m_renderSurfaceLayerListImp l);
245 245
246 m_layerIterator = m_layerIteratorBegin = Types::LayerIterator::begin(&m_ renderSurfaceLayerListImpl); 246 m_layerIterator = m_layerIteratorBegin = Types::LayerIterator::begin(&m_ renderSurfaceLayerListImpl);
247 } 247 }
248 248
249 void calcDrawEtc(TestContentLayerChromium* root) 249 void calcDrawEtc(TestContentLayerChromium* root)
250 { 250 {
251 ASSERT(root == m_root.get()); 251 ASSERT(root == m_root.get());
252 int dummyMaxTextureSize = 512; 252 int dummyMaxTextureSize = 512;
253 253
254 ASSERT(!root->renderSurface()); 254 ASSERT(!root->renderSurface());
255 255
256 CCLayerTreeHostCommon::calculateDrawTransforms(root, root->bounds(), 1, dummyMaxTextureSize, m_renderSurfaceLayerListChromium); 256 CCLayerTreeHostCommon::calculateDrawTransforms(root, root->bounds(), 1, 1, dummyMaxTextureSize, m_renderSurfaceLayerListChromium);
257 CCLayerTreeHostCommon::calculateVisibleRects(m_renderSurfaceLayerListChr omium); 257 CCLayerTreeHostCommon::calculateVisibleRects(m_renderSurfaceLayerListChr omium);
258 258
259 m_layerIterator = m_layerIteratorBegin = Types::LayerIterator::begin(&m_ renderSurfaceLayerListChromium); 259 m_layerIterator = m_layerIteratorBegin = Types::LayerIterator::begin(&m_ renderSurfaceLayerListChromium);
260 } 260 }
261 261
262 void enterLayer(typename Types::LayerType* layer, typename Types::OcclusionT rackerType& occlusion) 262 void enterLayer(typename Types::LayerType* layer, typename Types::OcclusionT rackerType& occlusion)
263 { 263 {
264 ASSERT_EQ(layer, *m_layerIterator); 264 ASSERT_EQ(layer, *m_layerIterator);
265 ASSERT_TRUE(m_layerIterator.representsItself()); 265 ASSERT_TRUE(m_layerIterator.representsItself());
266 occlusion.enterLayer(m_layerIterator); 266 occlusion.enterLayer(m_layerIterator);
(...skipping 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after
3007 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInS creenSpace().bounds()); 3007 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInS creenSpace().bounds());
3008 EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size()); 3008 EXPECT_EQ(1u, occlusion.occlusionInScreenSpace().rects().size());
3009 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInT argetSurface().bounds()); 3009 EXPECT_RECT_EQ(IntRect(IntPoint(), trackingSize), occlusion.occlusionInT argetSurface().bounds());
3010 EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size()); 3010 EXPECT_EQ(1u, occlusion.occlusionInTargetSurface().rects().size());
3011 } 3011 }
3012 }; 3012 };
3013 3013
3014 ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestMinimumTrackingSize); 3014 ALL_CCOCCLUSIONTRACKER_TEST(CCOcclusionTrackerTestMinimumTrackingSize);
3015 3015
3016 } // namespace 3016 } // namespace
OLDNEW
« cc/CCMathUtil.cpp ('K') | « cc/CCMathUtil.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698