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

Side by Side Diff: skia/ext/platform_canvas_linux.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 | « no previous file | skia/ext/platform_canvas_mac.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 "skia/ext/platform_device.h" 9 #include "skia/ext/platform_device.h"
9 #include "third_party/skia/include/core/SkTypes.h" 10 #include "third_party/skia/include/core/SkTypes.h"
10 11
11 namespace skia { 12 namespace skia {
12 13
13 PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque) { 14 PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque) {
15 TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas",
16 "width", width, "height", height);
14 if (!initialize(width, height, is_opaque)) 17 if (!initialize(width, height, is_opaque))
15 SK_CRASH(); 18 SK_CRASH();
16 } 19 }
17 20
18 PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque, 21 PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque,
19 uint8_t* data) { 22 uint8_t* data) {
23 TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas",
24 "width", width, "height", height);
20 if (!initialize(width, height, is_opaque, data)) 25 if (!initialize(width, height, is_opaque, data))
21 SK_CRASH(); 26 SK_CRASH();
22 } 27 }
23 28
24 PlatformCanvas::~PlatformCanvas() { 29 PlatformCanvas::~PlatformCanvas() {
25 } 30 }
26 31
27 bool PlatformCanvas::initialize(int width, int height, bool is_opaque, 32 bool PlatformCanvas::initialize(int width, int height, bool is_opaque,
28 uint8_t* data) { 33 uint8_t* data) {
29 return initializeWithDevice(BitmapPlatformDevice::Create( 34 return initializeWithDevice(BitmapPlatformDevice::Create(
30 width, height, is_opaque, data)); 35 width, height, is_opaque, data));
31 } 36 }
32 37
33 } // namespace skia 38 } // namespace skia
OLDNEW
« no previous file with comments | « no previous file | skia/ext/platform_canvas_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698