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

Side by Side Diff: cc/tiles/tile_manager_unittest.cc

Issue 2888603002: Replace uses of legacy SkImageGenerator API (Closed)
Patch Set: Use ternary Created 3 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 unified diff | Download patch
« no previous file with comments | « cc/test/skia_common.cc ('k') | media/renderers/skcanvas_video_renderer.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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after
2314 2314
2315 class CheckerImagingTileManagerTest : public TestLayerTreeHostBase { 2315 class CheckerImagingTileManagerTest : public TestLayerTreeHostBase {
2316 public: 2316 public:
2317 class MockImageGenerator : public SkImageGenerator { 2317 class MockImageGenerator : public SkImageGenerator {
2318 public: 2318 public:
2319 explicit MockImageGenerator(const gfx::Size& size) 2319 explicit MockImageGenerator(const gfx::Size& size)
2320 : SkImageGenerator( 2320 : SkImageGenerator(
2321 SkImageInfo::MakeN32Premul(size.width(), size.height())) {} 2321 SkImageInfo::MakeN32Premul(size.width(), size.height())) {}
2322 2322
2323 protected: 2323 protected:
2324 MOCK_METHOD5(onGetPixels, 2324 MOCK_METHOD4(onGetPixels,
2325 bool(const SkImageInfo&, void*, size_t, SkPMColor[], int*)); 2325 bool(const SkImageInfo&, void*, size_t, const Options&));
2326 }; 2326 };
2327 2327
2328 void TearDown() override { 2328 void TearDown() override {
2329 // Allow all tasks on the image worker to run now. Any scheduled decodes 2329 // Allow all tasks on the image worker to run now. Any scheduled decodes
2330 // will be aborted. 2330 // will be aborted.
2331 task_runner_->set_run_tasks_synchronously(true); 2331 task_runner_->set_run_tasks_synchronously(true);
2332 } 2332 }
2333 2333
2334 LayerTreeSettings CreateSettings() override { 2334 LayerTreeSettings CreateSettings() override {
2335 LayerTreeSettings settings; 2335 LayerTreeSettings settings;
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
2648 EXPECT_TRUE(tile); 2648 EXPECT_TRUE(tile);
2649 else 2649 else
2650 EXPECT_FALSE(tile); 2650 EXPECT_FALSE(tile);
2651 } 2651 }
2652 } 2652 }
2653 host_impl()->client()->reset_did_request_impl_side_invalidation(); 2653 host_impl()->client()->reset_did_request_impl_side_invalidation();
2654 } 2654 }
2655 2655
2656 } // namespace 2656 } // namespace
2657 } // namespace cc 2657 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/skia_common.cc ('k') | media/renderers/skcanvas_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698