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

Unified Diff: cc/output/direct_renderer.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/direct_renderer.h ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/direct_renderer.cc
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc
index 84788c5d13d79fd719ac31ce83de165f23799fad..f90789d2145d8bce9c085c6c9df9b2b0fdcbfda1 100644
--- a/cc/output/direct_renderer.cc
+++ b/cc/output/direct_renderer.cc
@@ -81,8 +81,8 @@ void DirectRenderer::QuadRectTransform(gfx::Transform* quad_rect_transform,
}
void DirectRenderer::InitializeViewport(DrawingFrame* frame,
- gfx::Rect draw_rect,
- gfx::Rect viewport_rect,
+ const gfx::Rect& draw_rect,
+ const gfx::Rect& viewport_rect,
gfx::Size surface_size) {
bool flip_y = FlippedFramebuffer();
@@ -195,8 +195,8 @@ void DirectRenderer::DecideRenderPassAllocationsForFrame(
void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order,
ContextProvider* offscreen_context_provider,
float device_scale_factor,
- gfx::Rect device_viewport_rect,
- gfx::Rect device_clip_rect,
+ const gfx::Rect& device_viewport_rect,
+ const gfx::Rect& device_clip_rect,
bool allow_partial_swap,
bool disable_picture_quad_image_filtering) {
TRACE_EVENT0("cc", "DirectRenderer::DrawFrame");
@@ -317,8 +317,9 @@ void DirectRenderer::SetScissorStateForQuadWithRenderPassScissor(
SetScissorTestRectInDrawSpace(frame, quad_scissor_rect);
}
-void DirectRenderer::SetScissorTestRectInDrawSpace(const DrawingFrame* frame,
- gfx::RectF draw_space_rect) {
+void DirectRenderer::SetScissorTestRectInDrawSpace(
+ const DrawingFrame* frame,
+ const gfx::RectF& draw_space_rect) {
gfx::Rect window_space_rect = MoveFromDrawToWindowSpace(draw_space_rect);
if (NeedDeviceClip(frame))
window_space_rect.Intersect(DeviceClipRectInWindowSpace(frame));
« no previous file with comments | « cc/output/direct_renderer.h ('k') | cc/output/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698