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

Side by Side Diff: cc/raster/raster_buffer_provider_unittest.cc

Issue 2160683003: Fix MultiPictureDraw issues with GpuImageDecodeController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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
« no previous file with comments | « cc/raster/gpu_raster_buffer_provider.cc ('k') | cc/test/skia_common.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/raster/raster_buffer_provider.h" 5 #include "cc/raster/raster_buffer_provider.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 TileTask::Vector* dependencies) 68 TileTask::Vector* dependencies)
69 : TileTask(true, dependencies), 69 : TileTask(true, dependencies),
70 completion_handler_(completion_handler), 70 completion_handler_(completion_handler),
71 resource_(std::move(resource)), 71 resource_(std::move(resource)),
72 id_(id), 72 id_(id),
73 raster_buffer_(std::move(raster_buffer)), 73 raster_buffer_(std::move(raster_buffer)),
74 raster_source_(FakeRasterSource::CreateFilled(gfx::Size(1, 1))) {} 74 raster_source_(FakeRasterSource::CreateFilled(gfx::Size(1, 1))) {}
75 75
76 // Overridden from Task: 76 // Overridden from Task:
77 void RunOnWorkerThread() override { 77 void RunOnWorkerThread() override {
78 // Don't use the image hijack canvas for these tests, as they have no image
79 // decode controller.
80 RasterSource::PlaybackSettings settings;
81 settings.use_image_hijack_canvas = false;
82
78 uint64_t new_content_id = 0; 83 uint64_t new_content_id = 0;
79 raster_buffer_->Playback(raster_source_.get(), gfx::Rect(1, 1), 84 raster_buffer_->Playback(raster_source_.get(), gfx::Rect(1, 1),
80 gfx::Rect(1, 1), new_content_id, 1.f, 85 gfx::Rect(1, 1), new_content_id, 1.f, settings);
81 RasterSource::PlaybackSettings());
82 } 86 }
83 87
84 // Overridden from TileTask: 88 // Overridden from TileTask:
85 void OnTaskCompleted() override { 89 void OnTaskCompleted() override {
86 completion_handler_->OnRasterTaskCompleted(std::move(raster_buffer_), id_, 90 completion_handler_->OnRasterTaskCompleted(std::move(raster_buffer_), id_,
87 state().IsCanceled()); 91 state().IsCanceled());
88 } 92 }
89 93
90 protected: 94 protected:
91 ~TestRasterTaskImpl() override {} 95 ~TestRasterTaskImpl() override {}
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 390
387 INSTANTIATE_TEST_CASE_P(RasterBufferProviderTests, 391 INSTANTIATE_TEST_CASE_P(RasterBufferProviderTests,
388 RasterBufferProviderTest, 392 RasterBufferProviderTest,
389 ::testing::Values(RASTER_BUFFER_PROVIDER_TYPE_ZERO_COPY, 393 ::testing::Values(RASTER_BUFFER_PROVIDER_TYPE_ZERO_COPY,
390 RASTER_BUFFER_PROVIDER_TYPE_ONE_COPY, 394 RASTER_BUFFER_PROVIDER_TYPE_ONE_COPY,
391 RASTER_BUFFER_PROVIDER_TYPE_GPU, 395 RASTER_BUFFER_PROVIDER_TYPE_GPU,
392 RASTER_BUFFER_PROVIDER_TYPE_BITMAP)); 396 RASTER_BUFFER_PROVIDER_TYPE_BITMAP));
393 397
394 } // namespace 398 } // namespace
395 } // namespace cc 399 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/gpu_raster_buffer_provider.cc ('k') | cc/test/skia_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698