summaryrefslogtreecommitdiffstats
path: root/skia/ext/platform_canvas_win.cc
diff options
context:
space:
mode:
authorreed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 13:46:56 +0000
committerreed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 13:46:56 +0000
commit9d611ca0375cf3594423fa8571a30ed356e568f6 (patch)
tree6e04e592faf658dd786ea2cb1115af7ac7247124 /skia/ext/platform_canvas_win.cc
parentbd3db410a3334cbcbd50247306d286326003eb2c (diff)
downloadchromium_src-9d611ca0375cf3594423fa8571a30ed356e568f6.zip
chromium_src-9d611ca0375cf3594423fa8571a30ed356e568f6.tar.gz
chromium_src-9d611ca0375cf3594423fa8571a30ed356e568f6.tar.bz2
Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend
SkCanvas in any way, other than provide a host of constructors (and delayed constructors in the form of 'initialize' methods). These late initializers are a problem, as SkCanvas is deprecating its setDevice() call, moving to model where the backingstore/device for the canvas must be created before the canvas is created. This is necessary to allow skia to continue to extend SkCanvas for its backends (e.g. GPU, PDF, Picture, Pipe, etc.). The practical change in this CL is to make PlatformCanvas just a typedef for SkCanvas, and change the call-sites that want to call initialize() to instead create the canvas using one of the provided Factory functions (e.g. CreatePlatformCanvas). The modifier Platform is maintained, to document that this canvas may be backed by platform-specific pixels (e.g. allocated by GDI or cairo). Review URL: https://codereview.chromium.org/11138024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167669 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/platform_canvas_win.cc')
-rw-r--r--skia/ext/platform_canvas_win.cc40
1 files changed, 0 insertions, 40 deletions
diff --git a/skia/ext/platform_canvas_win.cc b/skia/ext/platform_canvas_win.cc
deleted file mode 100644
index 7b9a787..0000000
--- a/skia/ext/platform_canvas_win.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <windows.h>
-#include <psapi.h>
-
-#include "base/debug/trace_event.h"
-#include "skia/ext/bitmap_platform_device_win.h"
-#include "skia/ext/platform_canvas.h"
-
-namespace skia {
-
-PlatformCanvas::PlatformCanvas(int width, int height, bool is_opaque) {
- TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas",
- "width", width, "height", height);
- initialize(width, height, is_opaque, NULL);
-}
-
-PlatformCanvas::PlatformCanvas(int width,
- int height,
- bool is_opaque,
- HANDLE shared_section) {
- TRACE_EVENT2("skia", "PlatformCanvas::PlatformCanvas",
- "width", width, "height", height);
- initialize(width, height, is_opaque, shared_section);
-}
-
-PlatformCanvas::~PlatformCanvas() {
-}
-
-bool PlatformCanvas::initialize(int width,
- int height,
- bool is_opaque,
- HANDLE shared_section) {
- return initializeWithDevice(BitmapPlatformDevice::Create(
- width, height, is_opaque, shared_section));
-}
-
-} // namespace skia