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

Side by Side Diff: cc/test/fake_tile_manager.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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/fake_scoped_ui_resource.cc ('k') | cc/test/fake_tile_manager_client.h » ('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 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/test/fake_tile_manager.h" 5 #include "cc/test/fake_tile_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 completed_tasks_.clear(); 47 completed_tasks_.clear();
48 } 48 }
49 ResourceFormat GetResourceFormat(bool must_support_alpha) const override { 49 ResourceFormat GetResourceFormat(bool must_support_alpha) const override {
50 return RGBA_8888; 50 return RGBA_8888;
51 } 51 }
52 bool GetResourceRequiresSwizzle(bool must_support_alpha) const override { 52 bool GetResourceRequiresSwizzle(bool must_support_alpha) const override {
53 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); 53 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha));
54 } 54 }
55 55
56 // Overridden from TileTaskClient: 56 // Overridden from TileTaskClient:
57 scoped_ptr<RasterBuffer> AcquireBufferForRaster( 57 std::unique_ptr<RasterBuffer> AcquireBufferForRaster(
58 const Resource* resource, 58 const Resource* resource,
59 uint64_t resource_content_id, 59 uint64_t resource_content_id,
60 uint64_t previous_content_id) override { 60 uint64_t previous_content_id) override {
61 return nullptr; 61 return nullptr;
62 } 62 }
63 void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override {} 63 void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override {}
64 64
65 private: 65 private:
66 RasterTask::Vector completed_tasks_; 66 RasterTask::Vector completed_tasks_;
67 }; 67 };
68 base::LazyInstance<FakeTileTaskRunnerImpl> g_fake_tile_task_runner = 68 base::LazyInstance<FakeTileTaskRunnerImpl> g_fake_tile_task_runner =
69 LAZY_INSTANCE_INITIALIZER; 69 LAZY_INSTANCE_INITIALIZER;
70 70
71 } // namespace 71 } // namespace
72 72
73 FakeTileManager::FakeTileManager(TileManagerClient* client) 73 FakeTileManager::FakeTileManager(TileManagerClient* client)
(...skipping 26 matching lines...) Expand all
100 } 100 }
101 101
102 void FakeTileManager::Release(Tile* tile) { 102 void FakeTileManager::Release(Tile* tile) {
103 TileManager::Release(tile); 103 TileManager::Release(tile);
104 104
105 FreeResourcesForReleasedTiles(); 105 FreeResourcesForReleasedTiles();
106 CleanUpReleasedTiles(); 106 CleanUpReleasedTiles();
107 } 107 }
108 108
109 } // namespace cc 109 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_scoped_ui_resource.cc ('k') | cc/test/fake_tile_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698