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

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

Issue 73923003: Shared Raster Worker Threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build Error for Mac, macro conflict, moving setter to WorkerPool. Created 6 years, 11 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/resources/picture_pile_base.cc ('k') | cc/resources/pixel_buffer_raster_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 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 <algorithm> 5 #include <algorithm>
6 #include <limits> 6 #include <limits>
7 7
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/base/region.h" 9 #include "cc/base/region.h"
10 #include "cc/debug/debug_colors.h" 10 #include "cc/debug/debug_colors.h"
11 #include "cc/resources/picture_pile_impl.h" 11 #include "cc/resources/picture_pile_impl.h"
12 #include "cc/resources/worker_pool.h"
12 #include "skia/ext/analysis_canvas.h" 13 #include "skia/ext/analysis_canvas.h"
13 #include "third_party/skia/include/core/SkCanvas.h" 14 #include "third_party/skia/include/core/SkCanvas.h"
14 #include "third_party/skia/include/core/SkSize.h" 15 #include "third_party/skia/include/core/SkSize.h"
15 #include "ui/gfx/rect_conversions.h" 16 #include "ui/gfx/rect_conversions.h"
16 #include "ui/gfx/size_conversions.h" 17 #include "ui/gfx/size_conversions.h"
17 #include "ui/gfx/skia_util.h" 18 #include "ui/gfx/skia_util.h"
18 19
19 namespace cc { 20 namespace cc {
20 21
21 PicturePileImpl::ClonesForDrawing::ClonesForDrawing( 22 PicturePileImpl::ClonesForDrawing::ClonesForDrawing(
(...skipping 21 matching lines...) Expand all
43 const PicturePileImpl* other, unsigned thread_index) { 44 const PicturePileImpl* other, unsigned thread_index) {
44 return make_scoped_refptr(new PicturePileImpl(other, thread_index)); 45 return make_scoped_refptr(new PicturePileImpl(other, thread_index));
45 } 46 }
46 47
47 PicturePileImpl::PicturePileImpl() 48 PicturePileImpl::PicturePileImpl()
48 : clones_for_drawing_(ClonesForDrawing(this, 0)) { 49 : clones_for_drawing_(ClonesForDrawing(this, 0)) {
49 } 50 }
50 51
51 PicturePileImpl::PicturePileImpl(const PicturePileBase* other) 52 PicturePileImpl::PicturePileImpl(const PicturePileBase* other)
52 : PicturePileBase(other), 53 : PicturePileBase(other),
53 clones_for_drawing_(ClonesForDrawing(this, num_raster_threads())) { 54 clones_for_drawing_(ClonesForDrawing(
55 this, WorkerPool::GetNumRasterThreads())) {
54 } 56 }
55 57
56 PicturePileImpl::PicturePileImpl( 58 PicturePileImpl::PicturePileImpl(
57 const PicturePileImpl* other, unsigned thread_index) 59 const PicturePileImpl* other, unsigned thread_index)
58 : PicturePileBase(other, thread_index), 60 : PicturePileBase(other, thread_index),
59 clones_for_drawing_(ClonesForDrawing(this, 0)) { 61 clones_for_drawing_(ClonesForDrawing(this, 0)) {
60 } 62 }
61 63
62 PicturePileImpl::~PicturePileImpl() { 64 PicturePileImpl::~PicturePileImpl() {
63 } 65 }
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 ++it) { 407 ++it) {
406 Picture* picture = it->second.GetPicture(); 408 Picture* picture = it->second.GetPicture();
407 if (picture && (processed_pictures.count(picture) == 0)) { 409 if (picture && (processed_pictures.count(picture) == 0)) {
408 picture->EmitTraceSnapshot(); 410 picture->EmitTraceSnapshot();
409 processed_pictures.insert(picture); 411 processed_pictures.insert(picture);
410 } 412 }
411 } 413 }
412 } 414 }
413 415
414 } // namespace cc 416 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_pile_base.cc ('k') | cc/resources/pixel_buffer_raster_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698