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

Side by Side Diff: cc/resources/bitmap_raster_worker_pool.cc

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/quads/render_pass.cc ('k') | cc/resources/bitmap_skpicture_content_layer_updater.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 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/resources/bitmap_raster_worker_pool.h" 5 #include "cc/resources/bitmap_raster_worker_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/debug/trace_event_argument.h" 10 #include "base/debug/trace_event_argument.h"
11 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
12 #include "cc/debug/traced_value.h" 12 #include "cc/debug/traced_value.h"
13 #include "cc/resources/raster_buffer.h" 13 #include "cc/resources/raster_buffer.h"
14 #include "cc/resources/raster_source.h" 14 #include "cc/resources/raster_source.h"
15 #include "cc/resources/resource.h" 15 #include "cc/resources/resource.h"
16 16
17 namespace cc { 17 namespace cc {
18 namespace { 18 namespace {
19 19
20 class RasterBufferImpl : public RasterBuffer { 20 class RasterBufferImpl : public RasterBuffer {
21 public: 21 public:
22 RasterBufferImpl(ResourceProvider* resource_provider, 22 RasterBufferImpl(ResourceProvider* resource_provider,
23 const Resource* resource) 23 const Resource* resource)
24 : lock_(resource_provider, resource->id()) {} 24 : lock_(resource_provider, resource->id()) {}
25 25
26 // Overridden from RasterBuffer: 26 // Overridden from RasterBuffer:
27 void Playback(const RasterSource* raster_source, 27 void Playback(const RasterSource* raster_source,
28 const gfx::Rect& rect, 28 const gfx::Rect& rect,
29 float scale, 29 float scale) override {
30 RenderingStatsInstrumentation* stats) override { 30 raster_source->PlaybackToCanvas(lock_.sk_canvas(), rect, scale);
31 raster_source->PlaybackToCanvas(lock_.sk_canvas(), rect, scale, stats);
32 } 31 }
33 32
34 private: 33 private:
35 ResourceProvider::ScopedWriteLockSoftware lock_; 34 ResourceProvider::ScopedWriteLockSoftware lock_;
36 35
37 DISALLOW_COPY_AND_ASSIGN(RasterBufferImpl); 36 DISALLOW_COPY_AND_ASSIGN(RasterBufferImpl);
38 }; 37 };
39 38
40 } // namespace 39 } // namespace
41 40
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 new base::debug::TracedValue(); 194 new base::debug::TracedValue();
196 195
197 state->BeginArray("tasks_pending"); 196 state->BeginArray("tasks_pending");
198 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) 197 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set)
199 state->AppendBoolean(raster_pending_[task_set]); 198 state->AppendBoolean(raster_pending_[task_set]);
200 state->EndArray(); 199 state->EndArray();
201 return state; 200 return state;
202 } 201 }
203 202
204 } // namespace cc 203 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/render_pass.cc ('k') | cc/resources/bitmap_skpicture_content_layer_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698