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

Unified Diff: cc/tiles/gpu_image_decode_controller_unittest.cc

Issue 1985973002: Defer compositor context creation to the thread. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: contextfactory: . Created 4 years, 7 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
Index: cc/tiles/gpu_image_decode_controller_unittest.cc
diff --git a/cc/tiles/gpu_image_decode_controller_unittest.cc b/cc/tiles/gpu_image_decode_controller_unittest.cc
index 1891f2e55710e4e4ec3ac055a2327a02038063d0..010a863fd64c8f854abd0f97d02c2ab3bf2226d3 100644
--- a/cc/tiles/gpu_image_decode_controller_unittest.cc
+++ b/cc/tiles/gpu_image_decode_controller_unittest.cc
@@ -61,7 +61,6 @@ void ProcessTask(TileTask* task) {
TEST(GpuImageDecodeControllerTest, GetTaskForImageSameImage) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
sk_sp<SkImage> image = CreateImage(100, 100);
@@ -95,7 +94,6 @@ TEST(GpuImageDecodeControllerTest, GetTaskForImageSameImage) {
TEST(GpuImageDecodeControllerTest, GetTaskForImageDifferentImage) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;
@@ -134,7 +132,6 @@ TEST(GpuImageDecodeControllerTest, GetTaskForImageDifferentImage) {
TEST(GpuImageDecodeControllerTest, GetTaskForImageAlreadyDecodedAndLocked) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;
@@ -180,7 +177,6 @@ TEST(GpuImageDecodeControllerTest, GetTaskForImageAlreadyDecodedAndLocked) {
TEST(GpuImageDecodeControllerTest, GetTaskForImageAlreadyDecodedNotLocked) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;
@@ -226,7 +222,6 @@ TEST(GpuImageDecodeControllerTest, GetTaskForImageAlreadyDecodedNotLocked) {
TEST(GpuImageDecodeControllerTest, GetTaskForImageAlreadyUploaded) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;
@@ -262,7 +257,6 @@ TEST(GpuImageDecodeControllerTest, GetTaskForImageAlreadyUploaded) {
TEST(GpuImageDecodeControllerTest, GetTaskForImageCanceledGetsNewTask) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;
@@ -311,7 +305,6 @@ TEST(GpuImageDecodeControllerTest, GetTaskForImageCanceledGetsNewTask) {
TEST(GpuImageDecodeControllerTest,
GetTaskForImageCanceledWhileReffedGetsNewTask) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;
@@ -359,7 +352,6 @@ TEST(GpuImageDecodeControllerTest,
TEST(GpuImageDecodeControllerTest, NoTaskForImageAlreadyFailedDecoding) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;
@@ -393,7 +385,6 @@ TEST(GpuImageDecodeControllerTest, NoTaskForImageAlreadyFailedDecoding) {
TEST(GpuImageDecodeControllerTest, GetDecodedImageForDraw) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;
@@ -427,7 +418,6 @@ TEST(GpuImageDecodeControllerTest, GetDecodedImageForDraw) {
TEST(GpuImageDecodeControllerTest, GetLargeDecodedImageForDraw) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;
@@ -461,7 +451,6 @@ TEST(GpuImageDecodeControllerTest, GetLargeDecodedImageForDraw) {
TEST(GpuImageDecodeControllerTest, GetDecodedImageForDrawAtRasterDecode) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;
@@ -495,7 +484,6 @@ TEST(GpuImageDecodeControllerTest, GetDecodedImageForDrawAtRasterDecode) {
TEST(GpuImageDecodeControllerTest, AtRasterUsedDirectlyIfSpaceAllows) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;
@@ -542,7 +530,6 @@ TEST(GpuImageDecodeControllerTest, AtRasterUsedDirectlyIfSpaceAllows) {
TEST(GpuImageDecodeControllerTest,
GetDecodedImageForDrawAtRasterDecodeMultipleTimes) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;
@@ -576,7 +563,6 @@ TEST(GpuImageDecodeControllerTest,
TEST(GpuImageDecodeControllerTest, ZeroSizedImagesAreSkipped) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;
@@ -605,7 +591,6 @@ TEST(GpuImageDecodeControllerTest, ZeroSizedImagesAreSkipped) {
TEST(GpuImageDecodeControllerTest, NonOverlappingSrcRectImagesAreSkipped) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;
@@ -634,7 +619,6 @@ TEST(GpuImageDecodeControllerTest, NonOverlappingSrcRectImagesAreSkipped) {
TEST(GpuImageDecodeControllerTest, CanceledTasksDoNotCountAgainstBudget) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;
@@ -663,7 +647,6 @@ TEST(GpuImageDecodeControllerTest, CanceledTasksDoNotCountAgainstBudget) {
TEST(GpuImageDecodeControllerTest, ShouldAggressivelyFreeResources) {
auto context_provider = TestContextProvider::Create();
- context_provider->BindToCurrentThread();
GpuImageDecodeController controller(context_provider.get(),
ResourceFormat::RGBA_8888);
bool is_decomposable = true;

Powered by Google App Engine
This is Rietveld 408576698