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

Side by Side Diff: cc/picture_pile_impl.cc

Issue 11453014: Implement the logic to kick off image decoding jobs for TileManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moving pending_pixel_refs to the persistent section Created 8 years 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 | Annotate | Revision Log
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 "base/debug/trace_event.h" 5 #include "base/debug/trace_event.h"
6 #include "cc/picture_pile_impl.h" 6 #include "cc/picture_pile_impl.h"
7 #include "cc/rendering_stats.h" 7 #include "cc/rendering_stats.h"
8 #include "third_party/skia/include/core/SkCanvas.h" 8 #include "third_party/skia/include/core/SkCanvas.h"
9 #include "third_party/skia/include/core/SkSize.h" 9 #include "third_party/skia/include/core/SkSize.h"
10 #include "ui/gfx/rect_conversions.h" 10 #include "ui/gfx/rect_conversions.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 SkISize deviceSize = canvas->getDeviceSize(); 73 SkISize deviceSize = canvas->getDeviceSize();
74 stats->totalPixelsRasterized += deviceSize.width() * deviceSize.height(); 74 stats->totalPixelsRasterized += deviceSize.width() * deviceSize.height();
75 } 75 }
76 canvas->restore(); 76 canvas->restore();
77 77
78 stats->totalRasterizeTimeInSeconds += (base::TimeTicks::Now() - 78 stats->totalRasterizeTimeInSeconds += (base::TimeTicks::Now() -
79 rasterizeBeginTime).InSecondsF(); 79 rasterizeBeginTime).InSecondsF();
80 } 80 }
81 81
82 void PicturePileImpl::GatherPixelRefs(
83 const gfx::Rect& rect, std::list<skia::LazyPixelRef*>& pixel_refs) {
84 std::list<skia::LazyPixelRef*> result;
85 for (PicturePile::Pile::const_iterator i = pile_.begin();
86 i != pile_.end(); ++i) {
87 (*i)->GatherPixelRefs(rect, result);
88 pixel_refs.splice(pixel_refs.end(), result);
89 }
90 }
91
82 } // namespace cc 92 } // namespace cc
OLDNEW
« no previous file with comments | « cc/picture_pile_impl.h ('k') | cc/tile_manager.h » ('j') | cc/tile_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698