summaryrefslogtreecommitdiffstats
path: root/cc/test/layer_test_common.h
diff options
context:
space:
mode:
authordtrainor@chromium.org <dtrainor@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 18:46:21 +0000
committerdtrainor@chromium.org <dtrainor@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 18:46:21 +0000
commit06d68d0778f26bcc1a804ccc37cb57390d33d4ac (patch)
treebd38d836e64a1e3ecb0557a5b2b16be8f737cfde /cc/test/layer_test_common.h
parent2f7b6fcfc7a0ea20a2be3cb02fce98649a3e9fc9 (diff)
downloadchromium_src-06d68d0778f26bcc1a804ccc37cb57390d33d4ac.zip
chromium_src-06d68d0778f26bcc1a804ccc37cb57390d33d4ac.tar.gz
chromium_src-06d68d0778f26bcc1a804ccc37cb57390d33d4ac.tar.bz2
Add optimization to TextureLayer
Since there's no way to query UV coords, we shouldn't be committing if we have to push UV every frame. BUG= Review URL: https://chromiumcodereview.appspot.com/13910011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195248 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/layer_test_common.h')
-rw-r--r--cc/test/layer_test_common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/cc/test/layer_test_common.h b/cc/test/layer_test_common.h
index 5c0bb29..94e2f2a 100644
--- a/cc/test/layer_test_common.h
+++ b/cc/test/layer_test_common.h
@@ -5,6 +5,12 @@
#ifndef CC_TEST_LAYER_TEST_COMMON_H_
#define CC_TEST_LAYER_TEST_COMMON_H_
+#define EXPECT_SET_NEEDS_COMMIT(expect, code_to_test) do { \
+ EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times((expect)); \
+ code_to_test; \
+ Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \
+ } while (false)
+
namespace gfx { class Rect; }
namespace cc {