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

Side by Side Diff: cc/resources/resource_update_controller_unittest.cc

Issue 648293006: cc: turn on distance field text on animated layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved dff setting from rasterprovider to gpurasterpool Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "cc/resources/resource_update_controller.h" 5 #include "cc/resources/resource_update_controller.h"
6 6
7 #include "base/test/test_simple_task_runner.h" 7 #include "base/test/test_simple_task_runner.h"
8 #include "cc/resources/prioritized_resource_manager.h" 8 #include "cc/resources/prioritized_resource_manager.h"
9 #include "cc/test/fake_output_surface.h" 9 #include "cc/test/fake_output_surface.h"
10 #include "cc/test/fake_output_surface_client.h" 10 #include "cc/test/fake_output_surface_client.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 new WebGraphicsContext3DForUploadTest(this))); 124 new WebGraphicsContext3DForUploadTest(this)));
125 CHECK(output_surface_->BindToClient(&output_surface_client_)); 125 CHECK(output_surface_->BindToClient(&output_surface_client_));
126 126
127 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); 127 shared_bitmap_manager_.reset(new TestSharedBitmapManager());
128 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 128 resource_provider_ = ResourceProvider::Create(output_surface_.get(),
129 shared_bitmap_manager_.get(), 129 shared_bitmap_manager_.get(),
130 NULL, 130 NULL,
131 NULL, 131 NULL,
132 0, 132 0,
133 false, 133 false,
134 1, 134 1);
135 false);
136 } 135 }
137 136
138 void AppendFullUploadsOfIndexedTextureToUpdateQueue(int count, 137 void AppendFullUploadsOfIndexedTextureToUpdateQueue(int count,
139 int texture_index) { 138 int texture_index) {
140 full_upload_count_expected_ += count; 139 full_upload_count_expected_ += count;
141 total_upload_count_expected_ += count; 140 total_upload_count_expected_ += count;
142 141
143 const gfx::Rect rect(0, 0, 300, 150); 142 const gfx::Rect rect(0, 0, 300, 150);
144 const ResourceUpdate upload = ResourceUpdate::Create( 143 const ResourceUpdate upload = ResourceUpdate::Create(
145 textures_[texture_index].get(), &bitmap_, rect, rect, gfx::Vector2d()); 144 textures_[texture_index].get(), &bitmap_, rect, rect, gfx::Vector2d());
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 RunPendingTask(task_runner.get(), controller.get()); 508 RunPendingTask(task_runner.get(), controller.get());
510 } 509 }
511 510
512 EXPECT_FALSE(task_runner->HasPendingTask()); 511 EXPECT_FALSE(task_runner->HasPendingTask());
513 EXPECT_TRUE(client.ReadyToFinalizeCalled()); 512 EXPECT_TRUE(client.ReadyToFinalizeCalled());
514 EXPECT_EQ(2, num_total_uploads_); 513 EXPECT_EQ(2, num_total_uploads_);
515 } 514 }
516 515
517 } // namespace 516 } // namespace
518 } // namespace cc 517 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698