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

Unified Diff: printing/emf_win.cc

Issue 6665046: Unfork VectorPlatformCanvas. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 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 side-by-side diff with in-line comments
Download patch
Index: printing/emf_win.cc
diff --git a/printing/emf_win.cc b/printing/emf_win.cc
index 1d1dd530b978abafc770641c193f0d652cc456d4..1c2b19c5ab80bbd1a6138f52ea2c6b271d65eff3 100644
--- a/printing/emf_win.cc
+++ b/printing/emf_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -9,6 +9,7 @@
#include "base/metrics/histogram.h"
#include "base/scoped_ptr.h"
#include "base/time.h"
+#include "skia/ext/vector_platform_device_win.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/codec/jpeg_codec.h"
#include "ui/gfx/codec/png_codec.h"
@@ -410,6 +411,18 @@ bool Emf::Record::SafePlayback(const XFORM* base_matrix) const {
return res;
}
+skia::PlatformDevice* Emf::StartPageForVectorCanvas(
+ const gfx::Size& page_size, const gfx::Point& /*content_origin*/,
+ const float& scale_factor) {
+ DCHECK_EQ(1.0f, scale_factor); // We don't support scaling here.
+ if (!StartPage())
+ return NULL;
+
+ return skia::VectorPlatformDeviceFactory::CreateDevice(page_size.width(),
+ page_size.height(),
+ true, hdc_);
+}
+
bool Emf::StartPage() {
DCHECK(hdc_);
if (!hdc_)
« no previous file with comments | « printing/emf_win.h ('k') | printing/native_metafile.h » ('j') | skia/ext/vector_canvas.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698