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

Unified Diff: cc/output/software_output_device.cc

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 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
« no previous file with comments | « cc/output/software_output_device.h ('k') | cc/output/software_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/software_output_device.cc
diff --git a/cc/output/software_output_device.cc b/cc/output/software_output_device.cc
index 17ef63f6d57731f26b7afe5870c59fc3e99c04a4..3e75e069f376f4ef038134e3a6806c50aad2e1d2 100644
--- a/cc/output/software_output_device.cc
+++ b/cc/output/software_output_device.cc
@@ -27,7 +27,7 @@ void SoftwareOutputDevice::Resize(gfx::Size viewport_size) {
canvas_ = skia::AdoptRef(new SkCanvas(device_.get()));
}
-SkCanvas* SoftwareOutputDevice::BeginPaint(gfx::Rect damage_rect) {
+SkCanvas* SoftwareOutputDevice::BeginPaint(const gfx::Rect& damage_rect) {
DCHECK(device_);
damage_rect_ = damage_rect;
return canvas_.get();
@@ -42,14 +42,14 @@ void SoftwareOutputDevice::EndPaint(SoftwareFrameData* frame_data) {
}
void SoftwareOutputDevice::CopyToBitmap(
- gfx::Rect rect, SkBitmap* output) {
+ const gfx::Rect& rect, SkBitmap* output) {
DCHECK(device_);
const SkBitmap& bitmap = device_->accessBitmap(false);
bitmap.extractSubset(output, gfx::RectToSkIRect(rect));
}
void SoftwareOutputDevice::Scroll(
- gfx::Vector2d delta, gfx::Rect clip_rect) {
+ gfx::Vector2d delta, const gfx::Rect& clip_rect) {
NOTIMPLEMENTED();
}
« no previous file with comments | « cc/output/software_output_device.h ('k') | cc/output/software_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698