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

Side by Side Diff: cc/tiled_layer_unittest.cc

Issue 11360093: Mark layers that can use LCD text based on layer transform and opacity. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed unit tests Created 8 years, 1 month 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
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 "cc/tiled_layer.h" 7 #include "cc/tiled_layer.h"
8 8
9 #include "cc/bitmap_content_layer_updater.h" 9 #include "cc/bitmap_content_layer_updater.h"
10 #include "cc/layer_painter.h" 10 #include "cc/layer_painter.h"
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 1420
1421 // With a huge memory limit, all layers should update and push their texture s. 1421 // With a huge memory limit, all layers should update and push their texture s.
1422 root->invalidateContentRect(rootRect); 1422 root->invalidateContentRect(rootRect);
1423 child->invalidateContentRect(childRect); 1423 child->invalidateContentRect(childRect);
1424 child2->invalidateContentRect(child2Rect); 1424 child2->invalidateContentRect(child2Rect);
1425 layerTreeHost->updateLayers( 1425 layerTreeHost->updateLayers(
1426 *m_queue.get(), std::numeric_limits<size_t>::max()); 1426 *m_queue.get(), std::numeric_limits<size_t>::max());
1427 { 1427 {
1428 updateTextures(); 1428 updateTextures();
1429 EXPECT_EQ(6, root->fakeLayerUpdater()->updateCount()); 1429 EXPECT_EQ(6, root->fakeLayerUpdater()->updateCount());
1430 EXPECT_EQ(3, child->fakeLayerUpdater()->updateCount()); 1430 EXPECT_EQ(4, child->fakeLayerUpdater()->updateCount());
danakj 2012/11/07 18:15:00 Why did this happen?
alokp 2012/11/08 22:34:07 Because now we call setCanUseLCDText during update
1431 EXPECT_EQ(3, child2->fakeLayerUpdater()->updateCount()); 1431 EXPECT_EQ(4, child2->fakeLayerUpdater()->updateCount());
1432 EXPECT_FALSE(m_queue->hasMoreUpdates()); 1432 EXPECT_FALSE(m_queue->hasMoreUpdates());
1433 1433
1434 root->fakeLayerUpdater()->clearUpdateCount(); 1434 root->fakeLayerUpdater()->clearUpdateCount();
1435 child->fakeLayerUpdater()->clearUpdateCount(); 1435 child->fakeLayerUpdater()->clearUpdateCount();
1436 child2->fakeLayerUpdater()->clearUpdateCount(); 1436 child2->fakeLayerUpdater()->clearUpdateCount();
1437 1437
1438 ScopedFakeTiledLayerImpl rootImpl(root->id()); 1438 ScopedFakeTiledLayerImpl rootImpl(root->id());
1439 ScopedFakeTiledLayerImpl childImpl(child->id()); 1439 ScopedFakeTiledLayerImpl childImpl(child->id());
1440 ScopedFakeTiledLayerImpl child2Impl(child2->id()); 1440 ScopedFakeTiledLayerImpl child2Impl(child2->id());
1441 layerPushPropertiesTo(root.get(), rootImpl.get()); 1441 layerPushPropertiesTo(root.get(), rootImpl.get());
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 updateTextures(); 1621 updateTextures();
1622 1622
1623 // Invalidate the entire layer in layer space. When painting, the rect given to webkit should match the layer's bounds. 1623 // Invalidate the entire layer in layer space. When painting, the rect given to webkit should match the layer's bounds.
1624 layer->setNeedsDisplayRect(layerRect); 1624 layer->setNeedsDisplayRect(layerRect);
1625 layer->update(*m_queue.get(), 0, m_stats); 1625 layer->update(*m_queue.get(), 0, m_stats);
1626 1626
1627 EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect()); 1627 EXPECT_RECT_EQ(layerRect, layer->trackingLayerPainter()->paintedRect());
1628 } 1628 }
1629 1629
1630 } // anonymous namespace 1630 } // anonymous namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698