Fix other compilation errors
This commit is contained in:
parent
98fbe5127b
commit
5b2c0110dc
9 changed files with 16 additions and 27 deletions
|
@ -24,7 +24,6 @@
|
|||
#include "net/base/escape.h"
|
||||
#include "printing/pdf_metafile_skia.h"
|
||||
#include "printing/units.h"
|
||||
#include "skia/ext/vector_platform_device_skia.h"
|
||||
#include "third_party/WebKit/public/platform/WebSize.h"
|
||||
#include "third_party/WebKit/public/platform/WebURLRequest.h"
|
||||
#include "third_party/WebKit/public/web/WebConsoleMessage.h"
|
||||
|
|
|
@ -130,16 +130,11 @@ void PrintWebViewHelper::PrintPageInternal(
|
|||
&content_area);
|
||||
gfx::Rect canvas_area = content_area;
|
||||
|
||||
SkBaseDevice* device = metafile->StartPageForVectorCanvas(page_size,
|
||||
canvas_area,
|
||||
scale_factor);
|
||||
if (!device)
|
||||
skia::PlatformCanvas* canvas = metafile->GetVectorCanvasForNewPage(
|
||||
*page_size, canvas_area, scale_factor);
|
||||
if (!canvas)
|
||||
return;
|
||||
|
||||
// The printPage method take a reference to the canvas we pass down, so it
|
||||
// can't be a stack object.
|
||||
skia::RefPtr<skia::VectorCanvas> canvas =
|
||||
skia::AdoptRef(new skia::VectorCanvas(device));
|
||||
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
||||
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
|
||||
|
||||
|
|
|
@ -76,20 +76,17 @@ void PrintWebViewHelper::RenderPage(const PrintMsg_Print_Params& params,
|
|||
gfx::Rect canvas_area = content_area;
|
||||
|
||||
{
|
||||
SkBaseDevice* device = metafile->StartPageForVectorCanvas(
|
||||
skia::PlatformCanvas* canvas = metafile->GetVectorCanvasForNewPage(
|
||||
*page_size, canvas_area, scale_factor);
|
||||
if (!device)
|
||||
if (!canvas)
|
||||
return;
|
||||
|
||||
skia::RefPtr<skia::VectorCanvas> canvas =
|
||||
skia::AdoptRef(new skia::VectorCanvas(device));
|
||||
blink::WebCanvas* canvas_ptr = canvas.get();
|
||||
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
||||
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
|
||||
skia::SetIsPreviewMetafile(*canvas, is_preview);
|
||||
|
||||
RenderPageContent(frame, page_number, canvas_area, content_area,
|
||||
scale_factor, canvas_ptr);
|
||||
scale_factor, static_cast<blink::WebCanvas*>(canvas));
|
||||
}
|
||||
|
||||
// Done printing. Close the device context to retrieve the compiled metafile.
|
||||
|
|
|
@ -184,16 +184,11 @@ void PrintWebViewHelper::PrintPageInternal(
|
|||
frame->getPrintPageShrink(params.page_number);
|
||||
float scale_factor = css_scale_factor * webkit_page_shrink_factor;
|
||||
|
||||
SkBaseDevice* device = metafile->StartPageForVectorCanvas(page_size,
|
||||
canvas_area,
|
||||
scale_factor);
|
||||
if (!device)
|
||||
skia::PlatformCanvas* canvas = metafile->GetVectorCanvasForNewPage(
|
||||
page_size, canvas_area, scale_factor);
|
||||
if (!canvas)
|
||||
return;
|
||||
|
||||
// The printPage method take a reference to the canvas we pass down, so it
|
||||
// can't be a stack object.
|
||||
skia::RefPtr<skia::VectorCanvas> canvas =
|
||||
skia::AdoptRef(new skia::VectorCanvas(device));
|
||||
MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
|
||||
skia::SetIsDraftMode(*canvas, is_print_ready_metafile_sent_);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue