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

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

Issue 1885873002: cc: Rename TileTaskClient interface to RasterBufferProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_schedule
Patch Set: Removed patch dependency. 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/raster/bitmap_tile_task_worker_pool.h ('k') | cc/raster/gpu_tile_task_worker_pool.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/bitmap_tile_task_worker_pool.h" 5 #include "cc/raster/bitmap_tile_task_worker_pool.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>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
15 #include "base/trace_event/trace_event.h" 15 #include "base/trace_event/trace_event.h"
16 #include "base/trace_event/trace_event_argument.h" 16 #include "base/trace_event/trace_event_argument.h"
17 #include "cc/debug/traced_value.h" 17 #include "cc/debug/traced_value.h"
18 #include "cc/playback/raster_source.h" 18 #include "cc/playback/raster_source.h"
19 #include "cc/raster/raster_buffer.h"
20 #include "cc/resources/platform_color.h" 19 #include "cc/resources/platform_color.h"
21 #include "cc/resources/resource.h" 20 #include "cc/resources/resource.h"
22 21
23 namespace cc { 22 namespace cc {
24 namespace { 23 namespace {
25 24
26 class RasterBufferImpl : public RasterBuffer { 25 class RasterBufferImpl : public RasterBuffer {
27 public: 26 public:
28 RasterBufferImpl(ResourceProvider* resource_provider, 27 RasterBufferImpl(ResourceProvider* resource_provider,
29 const Resource* resource, 28 const Resource* resource,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 ResourceFormat BitmapTileTaskWorkerPool::GetResourceFormat( 125 ResourceFormat BitmapTileTaskWorkerPool::GetResourceFormat(
127 bool must_support_alpha) const { 126 bool must_support_alpha) const {
128 return resource_provider_->best_texture_format(); 127 return resource_provider_->best_texture_format();
129 } 128 }
130 129
131 bool BitmapTileTaskWorkerPool::GetResourceRequiresSwizzle( 130 bool BitmapTileTaskWorkerPool::GetResourceRequiresSwizzle(
132 bool must_support_alpha) const { 131 bool must_support_alpha) const {
133 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha)); 132 return ResourceFormatRequiresSwizzle(GetResourceFormat(must_support_alpha));
134 } 133 }
135 134
135 RasterBufferProvider* BitmapTileTaskWorkerPool::AsRasterBufferProvider() {
136 return this;
137 }
138
136 std::unique_ptr<RasterBuffer> BitmapTileTaskWorkerPool::AcquireBufferForRaster( 139 std::unique_ptr<RasterBuffer> BitmapTileTaskWorkerPool::AcquireBufferForRaster(
137 const Resource* resource, 140 const Resource* resource,
138 uint64_t resource_content_id, 141 uint64_t resource_content_id,
139 uint64_t previous_content_id) { 142 uint64_t previous_content_id) {
140 return std::unique_ptr<RasterBuffer>(new RasterBufferImpl( 143 return std::unique_ptr<RasterBuffer>(new RasterBufferImpl(
141 resource_provider_, resource, resource_content_id, previous_content_id)); 144 resource_provider_, resource, resource_content_id, previous_content_id));
142 } 145 }
143 146
144 void BitmapTileTaskWorkerPool::ReleaseBufferForRaster( 147 void BitmapTileTaskWorkerPool::ReleaseBufferForRaster(
145 std::unique_ptr<RasterBuffer> buffer) { 148 std::unique_ptr<RasterBuffer> buffer) {
146 // Nothing to do here. RasterBufferImpl destructor cleans up after itself. 149 // Nothing to do here. RasterBufferImpl destructor cleans up after itself.
147 } 150 }
148 151
149 } // namespace cc 152 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/bitmap_tile_task_worker_pool.h ('k') | cc/raster/gpu_tile_task_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698