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

Unified Diff: cc/surfaces/surface_hittest.cc

Issue 2150633002: cc: Pass SurfaceId by const ref in more places (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/surfaces/surface_hittest.h ('k') | cc/surfaces/surface_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_hittest.cc
diff --git a/cc/surfaces/surface_hittest.cc b/cc/surfaces/surface_hittest.cc
index b56f976bbee708c743aceb3c7bf15dc3836f2952..20fb717c46bfc3022b1e7e4740258ba669cff2da 100644
--- a/cc/surfaces/surface_hittest.cc
+++ b/cc/surfaces/surface_hittest.cc
@@ -23,9 +23,10 @@ SurfaceHittest::SurfaceHittest(SurfaceHittestDelegate* delegate,
SurfaceHittest::~SurfaceHittest() {}
-SurfaceId SurfaceHittest::GetTargetSurfaceAtPoint(SurfaceId root_surface_id,
- const gfx::Point& point,
- gfx::Transform* transform) {
+SurfaceId SurfaceHittest::GetTargetSurfaceAtPoint(
+ const SurfaceId& root_surface_id,
+ const gfx::Point& point,
+ gfx::Transform* transform) {
SurfaceId out_surface_id = root_surface_id;
// Reset the output transform to identity.
@@ -40,9 +41,10 @@ SurfaceId SurfaceHittest::GetTargetSurfaceAtPoint(SurfaceId root_surface_id,
return out_surface_id;
}
-bool SurfaceHittest::GetTransformToTargetSurface(SurfaceId root_surface_id,
- SurfaceId target_surface_id,
- gfx::Transform* transform) {
+bool SurfaceHittest::GetTransformToTargetSurface(
+ const SurfaceId& root_surface_id,
+ const SurfaceId& target_surface_id,
+ gfx::Transform* transform) {
// Reset the output transform to identity.
if (transform)
*transform = gfx::Transform();
@@ -54,7 +56,7 @@ bool SurfaceHittest::GetTransformToTargetSurface(SurfaceId root_surface_id,
}
bool SurfaceHittest::GetTargetSurfaceAtPointInternal(
- SurfaceId surface_id,
+ const SurfaceId& surface_id,
const RenderPassId& render_pass_id,
const gfx::Point& point_in_root_target,
std::set<const RenderPass*>* referenced_passes,
@@ -148,8 +150,8 @@ bool SurfaceHittest::GetTargetSurfaceAtPointInternal(
}
bool SurfaceHittest::GetTransformToTargetSurfaceInternal(
- SurfaceId root_surface_id,
- SurfaceId target_surface_id,
+ const SurfaceId& root_surface_id,
+ const SurfaceId& target_surface_id,
const RenderPassId& render_pass_id,
std::set<const RenderPass*>* referenced_passes,
gfx::Transform* out_transform) {
@@ -228,7 +230,7 @@ bool SurfaceHittest::GetTransformToTargetSurfaceInternal(
}
const RenderPass* SurfaceHittest::GetRenderPassForSurfaceById(
- SurfaceId surface_id,
+ const SurfaceId& surface_id,
const RenderPassId& render_pass_id) {
Surface* surface = manager_->GetSurfaceForId(surface_id);
if (!surface)
« no previous file with comments | « cc/surfaces/surface_hittest.h ('k') | cc/surfaces/surface_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698