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

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

Issue 11138024: Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 "base/debug/trace_event.h"
8 #include "skia/ext/bitmap_platform_device.h" 8 #include "skia/ext/bitmap_platform_device.h"
9 9
10 // TODO(reveman): a lot of unnecessary duplication of code from 10 // TODO(reveman): a lot of unnecessary duplication of code from
11 // platform_canvas_[win|linux|mac].cc in here. Need to refactor 11 // platform_canvas_[win|linux|mac].cc in here. Need to refactor
12 // PlatformCanvas to avoid this: 12 // PlatformCanvas to avoid this:
13 // http://code.google.com/p/chromium/issues/detail?id=119555 13 // http://code.google.com/p/chromium/issues/detail?id=119555
14 14
15 namespace skia { 15 namespace skia {
16 16 #if 0
17 PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque) { 17 PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque) {
18 TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas", 18 TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas",
19 "width", width, "height", height); 19 "width", width, "height", height);
20 if (!initialize(width, height, is_opaque)) 20 if (!initialize(width, height, is_opaque))
21 SK_CRASH(); 21 SK_CRASH();
22 } 22 }
23 23
24 #if defined(WIN32) 24 #if defined(WIN32)
25 PlatformCanvas::PlatformCanvas(int width, 25 PlatformCanvas::PlatformCanvas(int width,
26 int height, 26 int height,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 uint8_t* data) { 102 uint8_t* data) {
103 // Use platform specific device for data. 103 // Use platform specific device for data.
104 if (data) 104 if (data)
105 return initializeWithDevice(BitmapPlatformDevice::Create( 105 return initializeWithDevice(BitmapPlatformDevice::Create(
106 width, height, is_opaque, data)); 106 width, height, is_opaque, data));
107 107
108 return initializeWithDevice(new SkDevice( 108 return initializeWithDevice(new SkDevice(
109 SkBitmap::kARGB_8888_Config, width, height, is_opaque)); 109 SkBitmap::kARGB_8888_Config, width, height, is_opaque));
110 } 110 }
111 #endif 111 #endif
112 112 #endif
113 } // namespace skia 113 } // namespace skia
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698