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

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: WIP - realigning code to get number of raster threads + nits 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"
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"
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 {
(...skipping 23 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, switches::GetNumRasterThreads())) {
reveman 2013/12/28 14:45:48 nit: this line should be indented 4 spaces relativ
sohanjg 2013/12/30 06:49:36 Done.
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

Powered by Google App Engine
This is Rietveld 408576698