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

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

Issue 9722032: aura: Use platform independent skia::PlatformCanvas when possible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use platform independent PlatformCanvas when use_aura=1 Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | skia/skia.gyp » ('j') | skia/skia.gyp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "skia/ext/platform_canvas.h"
6
7 #include "base/debug/trace_event.h"
8
9 namespace skia {
10
11 PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque) {
12 TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas",
13 "width", width, "height", height);
14 if (!initialize(width, height, is_opaque))
15 SK_CRASH();
16 }
17
18 PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque,
19 uint8_t* data) {
20 TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas",
21 "width", width, "height", height);
22 if (!initialize(width, height, is_opaque, data))
23 SK_CRASH();
24 }
25
26 PlatformCanvas::~PlatformCanvas() {
27 }
28
29 bool PlatformCanvas::initialize(int width, int height, bool is_opaque,
30 uint8_t* data) {
31 return initializeWithDevice(new SkDevice(SkBitmap::kARGB_8888_Config,
32 width, height,
33 is_opaque));
34 }
35
36 } // namespace skia
OLDNEW
« no previous file with comments | « no previous file | skia/skia.gyp » ('j') | skia/skia.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698