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

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: Code review changes 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
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/base/switches.h"
reveman 2014/01/07 17:24:06 no need to include this here
sohanjg 2014/01/08 05:55:43 Done.
10 #include "cc/debug/debug_colors.h" 11 #include "cc/debug/debug_colors.h"
11 #include "cc/resources/picture_pile_impl.h" 12 #include "cc/resources/picture_pile_impl.h"
13 #include "cc/resources/raster_worker_pool.h"
12 #include "skia/ext/analysis_canvas.h" 14 #include "skia/ext/analysis_canvas.h"
13 #include "third_party/skia/include/core/SkCanvas.h" 15 #include "third_party/skia/include/core/SkCanvas.h"
14 #include "third_party/skia/include/core/SkSize.h" 16 #include "third_party/skia/include/core/SkSize.h"
15 #include "ui/gfx/rect_conversions.h" 17 #include "ui/gfx/rect_conversions.h"
16 #include "ui/gfx/size_conversions.h" 18 #include "ui/gfx/size_conversions.h"
17 #include "ui/gfx/skia_util.h" 19 #include "ui/gfx/skia_util.h"
18 20
19 namespace cc { 21 namespace cc {
20 22
21 PicturePileImpl::ClonesForDrawing::ClonesForDrawing( 23 PicturePileImpl::ClonesForDrawing::ClonesForDrawing(
(...skipping 21 matching lines...) Expand all
43 const PicturePileImpl* other, unsigned thread_index) { 45 const PicturePileImpl* other, unsigned thread_index) {
44 return make_scoped_refptr(new PicturePileImpl(other, thread_index)); 46 return make_scoped_refptr(new PicturePileImpl(other, thread_index));
45 } 47 }
46 48
47 PicturePileImpl::PicturePileImpl() 49 PicturePileImpl::PicturePileImpl()
48 : clones_for_drawing_(ClonesForDrawing(this, 0)) { 50 : clones_for_drawing_(ClonesForDrawing(this, 0)) {
49 } 51 }
50 52
51 PicturePileImpl::PicturePileImpl(const PicturePileBase* other) 53 PicturePileImpl::PicturePileImpl(const PicturePileBase* other)
52 : PicturePileBase(other), 54 : PicturePileBase(other),
53 clones_for_drawing_(ClonesForDrawing(this, num_raster_threads())) { 55 clones_for_drawing_(ClonesForDrawing(
56 this, WorkerPool::GetNumRasterThreads())) {
54 } 57 }
55 58
56 PicturePileImpl::PicturePileImpl( 59 PicturePileImpl::PicturePileImpl(
57 const PicturePileImpl* other, unsigned thread_index) 60 const PicturePileImpl* other, unsigned thread_index)
58 : PicturePileBase(other, thread_index), 61 : PicturePileBase(other, thread_index),
59 clones_for_drawing_(ClonesForDrawing(this, 0)) { 62 clones_for_drawing_(ClonesForDrawing(this, 0)) {
60 } 63 }
61 64
62 PicturePileImpl::~PicturePileImpl() { 65 PicturePileImpl::~PicturePileImpl() {
63 } 66 }
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 ++it) { 408 ++it) {
406 Picture* picture = it->second.GetPicture(); 409 Picture* picture = it->second.GetPicture();
407 if (picture && (processed_pictures.count(picture) == 0)) { 410 if (picture && (processed_pictures.count(picture) == 0)) {
408 picture->EmitTraceSnapshot(); 411 picture->EmitTraceSnapshot();
409 processed_pictures.insert(picture); 412 processed_pictures.insert(picture);
410 } 413 }
411 } 414 }
412 } 415 }
413 416
414 } // namespace cc 417 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698