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

Unified Diff: cc/trees/layer_tree_host_unittest_copyrequest.cc

Issue 2317753002: cc: Abstract the LayerTreeHost. (Closed)
Patch Set: Rebase Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/layer_tree_host_unittest_damage.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_copyrequest.cc
diff --git a/cc/trees/layer_tree_host_unittest_copyrequest.cc b/cc/trees/layer_tree_host_unittest_copyrequest.cc
index 134b17c00c2659db6e0697611fb42dc03c39a5a3..5867452ab4fd676053e4d876d64a4db13c445511 100644
--- a/cc/trees/layer_tree_host_unittest_copyrequest.cc
+++ b/cc/trees/layer_tree_host_unittest_copyrequest.cc
@@ -60,7 +60,7 @@ class LayerTreeHostCopyRequestTestMultipleRequests
}
void NextStep() {
- int frame = layer_tree_host()->source_frame_number();
+ int frame = layer_tree_host()->SourceFrameNumber();
switch (frame) {
case 1:
child->RequestCopyOfOutput(CopyOutputRequest::CreateBitmapRequest(
@@ -119,7 +119,7 @@ class LayerTreeHostCopyRequestTestMultipleRequests
}
void CopyOutputCallback(size_t id, std::unique_ptr<CopyOutputResult> result) {
- EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
+ EXPECT_TRUE(layer_tree_host()->GetTaskRunnerProvider()->IsMainThread());
EXPECT_TRUE(result->HasBitmap());
std::unique_ptr<SkBitmap> bitmap = result->TakeBitmap();
EXPECT_EQ(result->size().ToString(),
@@ -214,7 +214,7 @@ class LayerTreeHostCopyRequestCompletionCausesCommit
}
void DidCommit() override {
- int frame = layer_tree_host()->source_frame_number();
+ int frame = layer_tree_host()->SourceFrameNumber();
switch (frame) {
case 1:
layer_->RequestCopyOfOutput(CopyOutputRequest::CreateBitmapRequest(
@@ -270,7 +270,7 @@ class LayerTreeHostCopyRequestTestLayerDestroyed
}
void DidCommit() override {
- int frame = layer_tree_host()->source_frame_number();
+ int frame = layer_tree_host()->SourceFrameNumber();
switch (frame) {
case 1:
main_destroyed_->RequestCopyOfOutput(
@@ -321,7 +321,7 @@ class LayerTreeHostCopyRequestTestLayerDestroyed
}
void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
- EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
+ EXPECT_TRUE(layer_tree_host()->GetTaskRunnerProvider()->IsMainThread());
EXPECT_TRUE(result->IsEmpty());
++callback_count_;
}
@@ -379,7 +379,7 @@ class LayerTreeHostCopyRequestTestInHiddenSubtree
void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
++callback_count_;
- EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
+ EXPECT_TRUE(layer_tree_host()->GetTaskRunnerProvider()->IsMainThread());
EXPECT_EQ(copy_layer_->bounds().ToString(), result->size().ToString())
<< callback_count_;
switch (callback_count_) {
@@ -484,7 +484,7 @@ class LayerTreeHostTestHiddenSurfaceNotAllocatedForSubtreeCopyRequest
}
void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
- EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
+ EXPECT_TRUE(layer_tree_host()->GetTaskRunnerProvider()->IsMainThread());
EXPECT_EQ(copy_layer_->bounds().ToString(), result->size().ToString());
EndTest();
}
@@ -578,7 +578,7 @@ class LayerTreeHostCopyRequestTestClippedOut
void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
// We should still get the content even if the copy requested layer was
// completely clipped away.
- EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
+ EXPECT_TRUE(layer_tree_host()->GetTaskRunnerProvider()->IsMainThread());
EXPECT_EQ(gfx::Size(10, 10).ToString(), result->size().ToString());
EndTest();
}
@@ -687,7 +687,7 @@ class LayerTreeHostTestAsyncTwoReadbacksWithoutDraw
}
void DidCommit() override {
- if (layer_tree_host()->source_frame_number() == 1) {
+ if (layer_tree_host()->SourceFrameNumber() == 1) {
// Allow drawing.
layer_tree()->SetViewportSize(gfx::Size(root_->bounds()));
@@ -696,7 +696,7 @@ class LayerTreeHostTestAsyncTwoReadbacksWithoutDraw
}
void CopyOutputCallback(std::unique_ptr<CopyOutputResult> result) {
- EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
+ EXPECT_TRUE(layer_tree_host()->GetTaskRunnerProvider()->IsMainThread());
// The first frame can't be drawn.
switch (callback_count_) {
@@ -754,7 +754,7 @@ class LayerTreeHostCopyRequestTestDeleteTexture
void ReceiveCopyRequestOutputAndCommit(
std::unique_ptr<CopyOutputResult> result) {
- EXPECT_TRUE(layer_tree_host()->task_runner_provider()->IsMainThread());
+ EXPECT_TRUE(layer_tree_host()->GetTaskRunnerProvider()->IsMainThread());
EXPECT_EQ(gfx::Size(10, 10).ToString(), result->size().ToString());
EXPECT_TRUE(result->HasTexture());
@@ -888,7 +888,7 @@ class LayerTreeHostCopyRequestTestCountTextures
virtual void RequestCopy(Layer* layer) = 0;
void DidCommit() override {
- switch (layer_tree_host()->source_frame_number()) {
+ switch (layer_tree_host()->SourceFrameNumber()) {
case 1:
// The layers have been pushed to the impl side and drawn. Any textures
// that are created in that process will have been allocated.
@@ -1060,7 +1060,7 @@ class LayerTreeHostCopyRequestTestDestroyBeforeCopy
}
void DidActivate() {
- switch (layer_tree_host()->source_frame_number()) {
+ switch (layer_tree_host()->SourceFrameNumber()) {
case 1: {
EXPECT_EQ(0, callback_count_);
// Put a copy request on the layer, but then don't allow any
@@ -1136,7 +1136,7 @@ class LayerTreeHostCopyRequestTestShutdownBeforeCopy
}
void DidActivate() {
- switch (layer_tree_host()->source_frame_number()) {
+ switch (layer_tree_host()->SourceFrameNumber()) {
case 1: {
EXPECT_EQ(0, callback_count_);
// Put a copy request on the layer, but then don't allow any
@@ -1199,7 +1199,7 @@ class LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest
void DidCommit() override {
// Send a copy request after the first commit.
- if (layer_tree_host()->source_frame_number() == 1) {
+ if (layer_tree_host()->SourceFrameNumber() == 1) {
child_->RequestCopyOfOutput(
CopyOutputRequest::CreateBitmapRequest(base::Bind(
&LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest::
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/layer_tree_host_unittest_damage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698