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

Side by Side Diff: cc/raster/raster_buffer_provider.cc

Issue 2045743003: cc: Add traces for identification of raster buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: correction Created 4 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/raster/raster_buffer_provider.h" 5 #include "cc/raster/raster_buffer_provider.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/playback/raster_source.h" 10 #include "cc/playback/raster_source.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 void RasterBufferProvider::PlaybackToMemory( 46 void RasterBufferProvider::PlaybackToMemory(
47 void* memory, 47 void* memory,
48 ResourceFormat format, 48 ResourceFormat format,
49 const gfx::Size& size, 49 const gfx::Size& size,
50 size_t stride, 50 size_t stride,
51 const RasterSource* raster_source, 51 const RasterSource* raster_source,
52 const gfx::Rect& canvas_bitmap_rect, 52 const gfx::Rect& canvas_bitmap_rect,
53 const gfx::Rect& canvas_playback_rect, 53 const gfx::Rect& canvas_playback_rect,
54 float scale, 54 float scale,
55 const RasterSource::PlaybackSettings& playback_settings) { 55 const RasterSource::PlaybackSettings& playback_settings) {
56 TRACE_EVENT0("cc", "RasterBufferProvider::PlaybackToMemory"); 56 TRACE_EVENT0("disabled-by-default-cc.debug",
57 "RasterBufferProvider::PlaybackToMemory");
57 58
58 DCHECK(IsSupportedPlaybackToMemoryFormat(format)) << format; 59 DCHECK(IsSupportedPlaybackToMemoryFormat(format)) << format;
59 60
60 // Uses kPremul_SkAlphaType since the result is not known to be opaque. 61 // Uses kPremul_SkAlphaType since the result is not known to be opaque.
61 SkImageInfo info = 62 SkImageInfo info =
62 SkImageInfo::MakeN32(size.width(), size.height(), kPremul_SkAlphaType); 63 SkImageInfo::MakeN32(size.width(), size.height(), kPremul_SkAlphaType);
63 64
64 // Use unknown pixel geometry to disable LCD text. 65 // Use unknown pixel geometry to disable LCD text.
65 SkSurfaceProps surface_props(0, kUnknown_SkPixelGeometry); 66 SkSurfaceProps surface_props(0, kUnknown_SkPixelGeometry);
66 if (raster_source->CanUseLCDText()) { 67 if (raster_source->CanUseLCDText()) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 case RGB_565: 144 case RGB_565:
144 case RED_8: 145 case RED_8:
145 case LUMINANCE_F16: 146 case LUMINANCE_F16:
146 return false; 147 return false;
147 } 148 }
148 NOTREACHED(); 149 NOTREACHED();
149 return false; 150 return false;
150 } 151 }
151 152
152 } // namespace cc 153 } // namespace cc
OLDNEW
« no previous file with comments | « cc/raster/one_copy_raster_buffer_provider.cc ('k') | cc/raster/zero_copy_raster_buffer_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698