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

Side by Side Diff: skia/ext/platform_canvas_mac.cc

Issue 8440008: Add traces in compositor, views and skia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git try Created 9 years, 1 month 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
« no previous file with comments | « skia/ext/platform_canvas_linux.cc ('k') | skia/ext/platform_canvas_win.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "skia/ext/platform_canvas.h" 5 #include "skia/ext/platform_canvas.h"
6 6
7 #include "base/debug/trace_event.h"
7 #include "skia/ext/bitmap_platform_device.h" 8 #include "skia/ext/bitmap_platform_device.h"
8 #include "third_party/skia/include/core/SkTypes.h" 9 #include "third_party/skia/include/core/SkTypes.h"
9 10
10 namespace skia { 11 namespace skia {
11 12
12 PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque) { 13 PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque) {
14 TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas",
15 "width", width, "height", height);
13 initialize(width, height, is_opaque); 16 initialize(width, height, is_opaque);
14 } 17 }
15 18
16 PlatformCanvas::PlatformCanvas(int width, 19 PlatformCanvas::PlatformCanvas(int width,
17 int height, 20 int height,
18 bool is_opaque, 21 bool is_opaque,
19 CGContextRef context) { 22 CGContextRef context) {
23 TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas",
24 "width", width, "height", height);
20 initialize(context, width, height, is_opaque); 25 initialize(context, width, height, is_opaque);
21 } 26 }
22 27
23 PlatformCanvas::PlatformCanvas(int width, 28 PlatformCanvas::PlatformCanvas(int width,
24 int height, 29 int height,
25 bool is_opaque, 30 bool is_opaque,
26 uint8_t* data) { 31 uint8_t* data) {
32 TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas",
33 "width", width, "height", height);
27 initialize(width, height, is_opaque, data); 34 initialize(width, height, is_opaque, data);
28 } 35 }
29 36
30 PlatformCanvas::~PlatformCanvas() { 37 PlatformCanvas::~PlatformCanvas() {
31 } 38 }
32 39
33 bool PlatformCanvas::initialize(int width, 40 bool PlatformCanvas::initialize(int width,
34 int height, 41 int height,
35 bool is_opaque, 42 bool is_opaque,
36 uint8_t* data) { 43 uint8_t* data) {
37 return initializeWithDevice(BitmapPlatformDevice::CreateWithData( 44 return initializeWithDevice(BitmapPlatformDevice::CreateWithData(
38 data, width, height, is_opaque)); 45 data, width, height, is_opaque));
39 } 46 }
40 47
41 bool PlatformCanvas::initialize(CGContextRef context, 48 bool PlatformCanvas::initialize(CGContextRef context,
42 int width, 49 int width,
43 int height, 50 int height,
44 bool is_opaque) { 51 bool is_opaque) {
45 return initializeWithDevice(BitmapPlatformDevice::Create( 52 return initializeWithDevice(BitmapPlatformDevice::Create(
46 context, width, height, is_opaque)); 53 context, width, height, is_opaque));
47 } 54 }
48 55
49 } // namespace skia 56 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/platform_canvas_linux.cc ('k') | skia/ext/platform_canvas_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698