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

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

Issue 14417014: cc: Add tile-free software compositing mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | 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 "cc/resources/tile_manager.h" 5 #include "cc/resources/tile_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 918
919 DCHECK(picture_pile); 919 DCHECK(picture_pile);
920 DCHECK(buffer); 920 DCHECK(buffer);
921 921
922 SkBitmap bitmap; 922 SkBitmap bitmap;
923 bitmap.setConfig(SkBitmap::kARGB_8888_Config, rect.width(), rect.height()); 923 bitmap.setConfig(SkBitmap::kARGB_8888_Config, rect.width(), rect.height());
924 bitmap.setPixels(buffer); 924 bitmap.setPixels(buffer);
925 SkDevice device(bitmap); 925 SkDevice device(bitmap);
926 SkCanvas canvas(&device); 926 SkCanvas canvas(&device);
927 927
928 #ifndef NDEBUG
929 // Any non-painted areas will be left in this color.
930 canvas->clear(DebugColors::NonPaintedFillColor());
931 #endif // NDEBUG
932
928 if (stats_instrumentation->record_rendering_stats()) { 933 if (stats_instrumentation->record_rendering_stats()) {
929 PicturePileImpl::RasterStats raster_stats; 934 PicturePileImpl::RasterStats raster_stats;
930 picture_pile->Raster(&canvas, rect, contents_scale, &raster_stats); 935 picture_pile->Raster(&canvas, rect, contents_scale, &raster_stats);
931 stats_instrumentation->AddRaster(raster_stats.total_rasterize_time, 936 stats_instrumentation->AddRaster(raster_stats.total_rasterize_time,
932 raster_stats.best_rasterize_time, 937 raster_stats.best_rasterize_time,
933 raster_stats.total_pixels_rasterized, 938 raster_stats.total_pixels_rasterized,
934 metadata.is_tile_in_pending_tree_now_bin); 939 metadata.is_tile_in_pending_tree_now_bin);
935 940
936 HISTOGRAM_CUSTOM_COUNTS("Renderer4.PictureRasterTimeUS", 941 HISTOGRAM_CUSTOM_COUNTS("Renderer4.PictureRasterTimeUS",
937 raster_stats.total_rasterize_time.InMicroseconds(), 942 raster_stats.total_rasterize_time.InMicroseconds(),
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 skia::LazyPixelRef* pixel_ref, 1035 skia::LazyPixelRef* pixel_ref,
1031 RenderingStatsInstrumentation* stats_instrumentation) { 1036 RenderingStatsInstrumentation* stats_instrumentation) {
1032 TRACE_EVENT0("cc", "TileManager::RunImageDecodeTask"); 1037 TRACE_EVENT0("cc", "TileManager::RunImageDecodeTask");
1033 base::TimeTicks start_time = stats_instrumentation->StartRecording(); 1038 base::TimeTicks start_time = stats_instrumentation->StartRecording();
1034 pixel_ref->Decode(); 1039 pixel_ref->Decode();
1035 base::TimeDelta duration = stats_instrumentation->EndRecording(start_time); 1040 base::TimeDelta duration = stats_instrumentation->EndRecording(start_time);
1036 stats_instrumentation->AddDeferredImageDecode(duration); 1041 stats_instrumentation->AddDeferredImageDecode(duration);
1037 } 1042 }
1038 1043
1039 } // namespace cc 1044 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698