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

Unified Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 1419283002: cc: Split Proxy and TaskRunnerProvider for the LayerTreeHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_context.cc
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index 514727598d25f9985ee00b2c3744eda795c3eb96..74b225e8725a261801f66400993612d5927bd2f0 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -412,7 +412,7 @@ class LayerTreeHostClientTakeAwayOutputSurface
}
void HideAndReleaseOutputSurface() {
- EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread());
+ EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
layer_tree_host()->SetVisible(false);
scoped_ptr<OutputSurface> surface =
layer_tree_host()->ReleaseOutputSurface();
@@ -436,7 +436,7 @@ class LayerTreeHostClientTakeAwayOutputSurface
}
void MakeVisible() {
- EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread());
+ EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
layer_tree_host()->SetVisible(true);
}
@@ -724,7 +724,7 @@ class LayerTreeHostContextTestLostContextAndEvictTextures
EvictTexturesOnImplThread,
base::Unretained(this)));
} else {
- DebugScopedSetImplThread impl(proxy());
+ DebugScopedSetImplThread impl(task_runner_provider());
EvictTexturesOnImplThread();
}
}
@@ -1224,15 +1224,14 @@ class UIResourceLostTest : public LayerTreeHostContextTest {
// the call to StepCompleteOnMainThread will not occur until after
// the commit completes, because the main thread is blocked.
void PostStepCompleteToMainThread() {
- proxy()->MainThreadTaskRunner()->PostTask(
+ task_runner_provider()->MainThreadTaskRunner()->PostTask(
FROM_HERE,
base::Bind(&UIResourceLostTest::StepCompleteOnMainThreadInternal,
- base::Unretained(this),
- time_step_));
+ base::Unretained(this), time_step_));
}
void PostLoseContextToImplThread() {
- EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread());
+ EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
ImplThreadTaskRunner()->PostTask(
FROM_HERE,
base::Bind(&LayerTreeHostContextTest::LoseContext,
@@ -1245,7 +1244,7 @@ class UIResourceLostTest : public LayerTreeHostContextTest {
private:
void StepCompleteOnMainThreadInternal(int step) {
- EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread());
+ EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
StepCompleteOnMainThread(step);
}
};
@@ -1266,7 +1265,7 @@ class UIResourceLostTestSimple : public UIResourceLostTest {
class UIResourceLostAfterCommit : public UIResourceLostTestSimple {
public:
void StepCompleteOnMainThread(int step) override {
- EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread());
+ EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
switch (step) {
case 0:
ui_resource_ = FakeScopedUIResource::Create(layer_tree_host());
@@ -1421,7 +1420,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(UIResourceLostBeforeCommit);
// commit. Impl-side-painting only.
class UIResourceLostBeforeActivateTree : public UIResourceLostTest {
void StepCompleteOnMainThread(int step) override {
- EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread());
+ EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
switch (step) {
case 0:
ui_resource_ = FakeScopedUIResource::Create(layer_tree_host());
@@ -1504,7 +1503,7 @@ SINGLE_AND_MULTI_THREAD_TEST_F(UIResourceLostBeforeActivateTree);
class UIResourceLostEviction : public UIResourceLostTestSimple {
public:
void StepCompleteOnMainThread(int step) override {
- EXPECT_TRUE(layer_tree_host()->proxy()->IsMainThread());
+ EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
switch (step) {
case 0:
ui_resource_ = FakeScopedUIResource::Create(layer_tree_host());
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698