Skip to content

Commit

Permalink
Do not pass float param by const-ref in Metafile::StartPage().
Browse files Browse the repository at this point in the history
Change-Id: I0abba6123bc998c24c60546676970413eaa22752
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2116075
Reviewed-by: Daniel Hosseinian <dhoss@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752907}
  • Loading branch information
leizleiz authored and Commit Bot committed Mar 24, 2020
1 parent 773231f commit 5c6ed5b
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion printing/emf_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ bool Emf::Record::SafePlayback(Emf::EnumerationContext* context) const {

void Emf::StartPage(const gfx::Size& /*page_size*/,
const gfx::Rect& /*content_area*/,
const float& /*scale_factor*/) {}
float /*scale_factor*/) {}

bool Emf::FinishPage() {
return true;
Expand Down
2 changes: 1 addition & 1 deletion printing/emf_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class PRINTING_EXPORT Emf : public Metafile {
// ignored.
void StartPage(const gfx::Size& page_size,
const gfx::Rect& content_area,
const float& scale_factor) override;
float scale_factor) override;
bool FinishPage() override;
bool FinishDocument() override;

Expand Down
2 changes: 1 addition & 1 deletion printing/metafile.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class PRINTING_EXPORT Metafile : public MetafilePlayer {
// in points (=1/72 in).
virtual void StartPage(const gfx::Size& page_size,
const gfx::Rect& content_area,
const float& scale_factor) = 0;
float scale_factor) = 0;

// Closes the current page and destroys the context used in rendering that
// page. The results of current page will be appended into the underlying
Expand Down
4 changes: 2 additions & 2 deletions printing/metafile_skia.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ bool MetafileSkia::InitFromData(const void* src_buffer,

void MetafileSkia::StartPage(const gfx::Size& page_size,
const gfx::Rect& content_area,
const float& scale_factor) {
float scale_factor) {
DCHECK_GT(page_size.width(), 0);
DCHECK_GT(page_size.height(), 0);
DCHECK_GT(scale_factor, 0.0f);
Expand Down Expand Up @@ -148,7 +148,7 @@ void MetafileSkia::StartPage(const gfx::Size& page_size,
cc::PaintCanvas* MetafileSkia::GetVectorCanvasForNewPage(
const gfx::Size& page_size,
const gfx::Rect& content_area,
const float& scale_factor) {
float scale_factor) {
StartPage(page_size, content_area, scale_factor);
return data_->recorder.getRecordingCanvas();
}
Expand Down
4 changes: 2 additions & 2 deletions printing/metafile_skia.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class PRINTING_EXPORT MetafileSkia : public Metafile {

void StartPage(const gfx::Size& page_size,
const gfx::Rect& content_area,
const float& scale_factor) override;
float scale_factor) override;
bool FinishPage() override;
bool FinishDocument() override;

Expand Down Expand Up @@ -88,7 +88,7 @@ class PRINTING_EXPORT MetafileSkia : public Metafile {
// until FinishPage() or FinishDocument() is called.
cc::PaintCanvas* GetVectorCanvasForNewPage(const gfx::Size& page_size,
const gfx::Rect& content_area,
const float& scale_factor);
float scale_factor);

// This is used for painting content of out-of-process subframes.
// For such a subframe, since the content is in another process, we create a
Expand Down
2 changes: 1 addition & 1 deletion printing/pdf_metafile_cg_mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ bool PdfMetafileCg::InitFromData(const void* src_buffer,

void PdfMetafileCg::StartPage(const gfx::Size& page_size,
const gfx::Rect& content_area,
const float& scale_factor) {
float scale_factor) {
DCHECK(context_.get());
DCHECK(!page_is_open_);

Expand Down
2 changes: 1 addition & 1 deletion printing/pdf_metafile_cg_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PRINTING_EXPORT PdfMetafileCg : public Metafile {
bool InitFromData(const void* src_buffer, size_t src_buffer_size) override;
void StartPage(const gfx::Size& page_size,
const gfx::Rect& content_area,
const float& scale_factor) override;
float scale_factor) override;
bool FinishPage() override;
bool FinishDocument() override;

Expand Down

0 comments on commit 5c6ed5b

Please sign in to comment.