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

Unified Diff: components/printing/renderer/print_web_view_helper.cc

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: Clean up comments, fix mac build Created 3 years, 11 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: components/printing/renderer/print_web_view_helper.cc
diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc
index 3144c40e3de9dd340bd48f41e0bf61febe6030bf..c40f8465783774523734d15e1c6acb439c9376ec 100644
--- a/components/printing/renderer/print_web_view_helper.cc
+++ b/components/printing/renderer/print_web_view_helper.cc
@@ -25,6 +25,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
+#include "cc/paint/paint_canvas.h"
#include "components/printing/common/print_messages.h"
#include "content/public/common/web_preferences.h"
#include "content/public/renderer/render_frame.h"
@@ -55,7 +56,6 @@
#include "third_party/WebKit/public/web/WebSettings.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "third_party/WebKit/public/web/WebViewClient.h"
-#include "third_party/skia/include/core/SkCanvas.h"
#include "ui/base/resource/resource_bundle.h"
using content::WebPreferences;
@@ -573,7 +573,7 @@ void PrintWebViewHelper::PrintHeaderAndFooter(
float webkit_scale_factor,
const PageSizeMargins& page_layout,
const PrintMsg_Print_Params& params) {
- SkAutoCanvasRestore auto_restore(canvas, true);
+ cc::PaintCanvasAutoRestore auto_restore(canvas, true);
canvas->scale(1 / webkit_scale_factor, 1 / webkit_scale_factor);
blink::WebSize page_size(page_layout.margin_left + page_layout.margin_right +
@@ -630,7 +630,7 @@ float PrintWebViewHelper::RenderPageContent(blink::WebFrame* frame,
const gfx::Rect& content_area,
double scale_factor,
blink::WebCanvas* canvas) {
- SkAutoCanvasRestore auto_restore(canvas, true);
+ cc::PaintCanvasAutoRestore auto_restore(canvas, true);
canvas->translate((content_area.x() - canvas_area.x()) / scale_factor,
(content_area.y() - canvas_area.y()) / scale_factor);
return frame->printPage(page_number, canvas);
@@ -1877,8 +1877,8 @@ void PrintWebViewHelper::PrintPageInternal(
float scale_factor = css_scale_factor;
#endif
- SkCanvas* canvas = metafile->GetVectorCanvasForNewPage(
- page_size, canvas_area, scale_factor);
+ cc::PaintCanvas* canvas =
danakj 2017/01/20 23:34:14 metafile is a PdfMetafileSkia, it won't return a P
+ metafile->GetVectorCanvasForNewPage(page_size, canvas_area, scale_factor);
if (!canvas)
return;

Powered by Google App Engine
This is Rietveld 408576698