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

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

Issue 12962007: cc: Chromify resource_update_queue (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 years, 9 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/bitmap_content_layer_updater.cc ('k') | cc/resources/image_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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_skpicture_content_layer_updater.h" 5 #include "cc/resources/bitmap_skpicture_content_layer_updater.h"
6 6
7 #include "base/time.h" 7 #include "base/time.h"
8 #include "cc/debug/rendering_stats.h" 8 #include "cc/debug/rendering_stats.h"
9 #include "cc/resources/layer_painter.h" 9 #include "cc/resources/layer_painter.h"
10 #include "cc/resources/prioritized_resource.h" 10 #include "cc/resources/prioritized_resource.h"
(...skipping 23 matching lines...) Expand all
34 base::TimeTicks paint_begin_time; 34 base::TimeTicks paint_begin_time;
35 if (stats) 35 if (stats)
36 paint_begin_time = base::TimeTicks::Now(); 36 paint_begin_time = base::TimeTicks::Now();
37 updater_->PaintContentsRect(&canvas, source_rect, stats); 37 updater_->PaintContentsRect(&canvas, source_rect, stats);
38 if (stats) 38 if (stats)
39 stats->totalPaintTime += base::TimeTicks::Now() - paint_begin_time; 39 stats->totalPaintTime += base::TimeTicks::Now() - paint_begin_time;
40 40
41 ResourceUpdate upload = ResourceUpdate::Create( 41 ResourceUpdate upload = ResourceUpdate::Create(
42 texture(), &bitmap_, source_rect, source_rect, dest_offset); 42 texture(), &bitmap_, source_rect, source_rect, dest_offset);
43 if (partial_update) 43 if (partial_update)
44 queue->appendPartialUpload(upload); 44 queue->AppendPartialUpload(upload);
45 else 45 else
46 queue->appendFullUpload(upload); 46 queue->AppendFullUpload(upload);
47 } 47 }
48 48
49 scoped_refptr<BitmapSkPictureContentLayerUpdater> 49 scoped_refptr<BitmapSkPictureContentLayerUpdater>
50 BitmapSkPictureContentLayerUpdater::Create(scoped_ptr<LayerPainter> painter) { 50 BitmapSkPictureContentLayerUpdater::Create(scoped_ptr<LayerPainter> painter) {
51 return make_scoped_refptr( 51 return make_scoped_refptr(
52 new BitmapSkPictureContentLayerUpdater(painter.Pass())); 52 new BitmapSkPictureContentLayerUpdater(painter.Pass()));
53 } 53 }
54 54
55 BitmapSkPictureContentLayerUpdater::BitmapSkPictureContentLayerUpdater( 55 BitmapSkPictureContentLayerUpdater::BitmapSkPictureContentLayerUpdater(
56 scoped_ptr<LayerPainter> painter) 56 scoped_ptr<LayerPainter> painter)
(...skipping 19 matching lines...) Expand all
76 if (stats) 76 if (stats)
77 rasterize_begin_time = base::TimeTicks::Now(); 77 rasterize_begin_time = base::TimeTicks::Now();
78 DrawPicture(canvas); 78 DrawPicture(canvas);
79 if (stats) { 79 if (stats) {
80 stats->totalRasterizeTime += base::TimeTicks::Now() - rasterize_begin_time; 80 stats->totalRasterizeTime += base::TimeTicks::Now() - rasterize_begin_time;
81 stats->totalPixelsRasterized += source_rect.width() * source_rect.height(); 81 stats->totalPixelsRasterized += source_rect.width() * source_rect.height();
82 } 82 }
83 } 83 }
84 84
85 } // namespace cc 85 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/bitmap_content_layer_updater.cc ('k') | cc/resources/image_layer_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698