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

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

Issue 1405883002: cc: Remove the base RasterSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge more Created 5 years, 2 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
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/zero_copy_tile_task_worker_pool.h" 5 #include "cc/raster/zero_copy_tile_task_worker_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
11 #include "base/trace_event/trace_event_argument.h" 11 #include "base/trace_event/trace_event_argument.h"
12 #include "cc/debug/traced_value.h" 12 #include "cc/debug/traced_value.h"
13 #include "cc/raster/raster_buffer.h" 13 #include "cc/raster/raster_buffer.h"
14 #include "cc/resources/platform_color.h" 14 #include "cc/resources/platform_color.h"
15 #include "cc/resources/resource.h" 15 #include "cc/resources/resource.h"
16 #include "ui/gfx/buffer_format_util.h" 16 #include "ui/gfx/buffer_format_util.h"
17 #include "ui/gfx/gpu_memory_buffer.h" 17 #include "ui/gfx/gpu_memory_buffer.h"
18 18
19 namespace cc { 19 namespace cc {
20 namespace { 20 namespace {
21 21
22 class RasterBufferImpl : public RasterBuffer { 22 class RasterBufferImpl : public RasterBuffer {
23 public: 23 public:
24 RasterBufferImpl(ResourceProvider* resource_provider, 24 RasterBufferImpl(ResourceProvider* resource_provider,
25 const Resource* resource) 25 const Resource* resource)
26 : lock_(resource_provider, resource->id()), resource_(resource) {} 26 : lock_(resource_provider, resource->id()), resource_(resource) {}
27 27
28 // Overridden from RasterBuffer: 28 // Overridden from RasterBuffer:
29 void Playback(const RasterSource* raster_source, 29 void Playback(const DisplayListRasterSource* raster_source,
30 const gfx::Rect& raster_full_rect, 30 const gfx::Rect& raster_full_rect,
31 const gfx::Rect& raster_dirty_rect, 31 const gfx::Rect& raster_dirty_rect,
32 uint64_t new_content_id, 32 uint64_t new_content_id,
33 float scale, 33 float scale,
34 bool include_images) override { 34 bool include_images) override {
35 gfx::GpuMemoryBuffer* gpu_memory_buffer = lock_.GetGpuMemoryBuffer(); 35 gfx::GpuMemoryBuffer* gpu_memory_buffer = lock_.GetGpuMemoryBuffer();
36 if (!gpu_memory_buffer) 36 if (!gpu_memory_buffer)
37 return; 37 return;
38 DCHECK_EQ( 38 DCHECK_EQ(
39 1u, gfx::NumberOfPlanesForBufferFormat(gpu_memory_buffer->GetFormat())); 39 1u, gfx::NumberOfPlanesForBufferFormat(gpu_memory_buffer->GetFormat()));
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 new base::trace_event::TracedValue(); 229 new base::trace_event::TracedValue();
230 230
231 state->BeginArray("tasks_pending"); 231 state->BeginArray("tasks_pending");
232 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) 232 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set)
233 state->AppendBoolean(tasks_pending_[task_set]); 233 state->AppendBoolean(tasks_pending_[task_set]);
234 state->EndArray(); 234 state->EndArray();
235 return state; 235 return state;
236 } 236 }
237 237
238 } // namespace cc 238 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/tile_task_worker_pool_unittest.cc ('k') | cc/test/fake_display_list_recording_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698