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

Unified Diff: cc/layer_impl_unittest.cc

Issue 11447028: cc: Split out calcDrawEtc from drawLayers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix TODO comment about animations Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: cc/layer_impl_unittest.cc
diff --git a/cc/layer_impl_unittest.cc b/cc/layer_impl_unittest.cc
index bf8e96ec47cde094cab91ab6fc955b4497154736..36c082808e384c074513055ecbfae7988a6f7e41 100644
--- a/cc/layer_impl_unittest.cc
+++ b/cc/layer_impl_unittest.cc
@@ -7,6 +7,7 @@
#include "cc/single_thread_proxy.h"
#include "cc/test/fake_impl_proxy.h"
#include "cc/test/fake_layer_tree_host_impl.h"
+#include "cc/thread.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/effects/SkBlurImageFilter.h"
@@ -51,6 +52,18 @@ namespace {
EXPECT_FALSE(grandChild->layerPropertyChanged()); \
EXPECT_TRUE(root->layerSurfacePropertyChanged())
+#define VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(codeToTest) \
+ root->resetAllChangeTrackingForSubtree(); \
+ hostImpl.resetNeedsUpdateDrawProperties(); \
+ codeToTest; \
+ EXPECT_TRUE(hostImpl.needsUpdateDrawProperties());
+
+#define VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(codeToTest) \
+ root->resetAllChangeTrackingForSubtree(); \
+ hostImpl.resetNeedsUpdateDrawProperties(); \
+ codeToTest; \
+ EXPECT_FALSE(hostImpl.needsUpdateDrawProperties());
+
TEST(LayerImplTest, verifyLayerChangesAreTrackedProperly)
{
//
« no previous file with comments | « cc/layer_impl.cc ('k') | cc/layer_tree_host_impl.h » ('j') | cc/layer_tree_host_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698