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

Side by Side Diff: cc/surfaces/surface_hittest.h

Issue 2184033003: Refactor browser process coordinate transformation methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed problematic DCHECK Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/surfaces/surface_hittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_SURFACES_SURFACE_HITTEST_H_ 5 #ifndef CC_SURFACES_SURFACE_HITTEST_H_
6 #define CC_SURFACES_SURFACE_HITTEST_H_ 6 #define CC_SURFACES_SURFACE_HITTEST_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "cc/surfaces/surface_id.h" 10 #include "cc/surfaces/surface_id.h"
(...skipping 26 matching lines...) Expand all
37 const gfx::Point& point, 37 const gfx::Point& point,
38 gfx::Transform* transform); 38 gfx::Transform* transform);
39 39
40 // Returns whether the target surface falls inside the provide root surface. 40 // Returns whether the target surface falls inside the provide root surface.
41 // Returns the |transform| to convert points from the root surface coordinate 41 // Returns the |transform| to convert points from the root surface coordinate
42 // space to the target surface coordinate space. 42 // space to the target surface coordinate space.
43 bool GetTransformToTargetSurface(const SurfaceId& root_surface_id, 43 bool GetTransformToTargetSurface(const SurfaceId& root_surface_id,
44 const SurfaceId& target_surface_id, 44 const SurfaceId& target_surface_id,
45 gfx::Transform* transform); 45 gfx::Transform* transform);
46 46
47 // Attempts to transform a point from the coordinate space of one surface to
48 // that of another, where one is surface is embedded within the other.
49 // Returns true if the transform is successfully applied, and false if
50 // neither surface is contained with the other.
51 bool TransformPointToTargetSurface(const SurfaceId& original_surface_id,
52 const SurfaceId& target_surface_id,
53 gfx::Point* point);
54
47 private: 55 private:
48 bool GetTargetSurfaceAtPointInternal( 56 bool GetTargetSurfaceAtPointInternal(
49 const SurfaceId& surface_id, 57 const SurfaceId& surface_id,
50 const RenderPassId& render_pass_id, 58 const RenderPassId& render_pass_id,
51 const gfx::Point& point_in_root_target, 59 const gfx::Point& point_in_root_target,
52 std::set<const RenderPass*>* referenced_passes, 60 std::set<const RenderPass*>* referenced_passes,
53 SurfaceId* out_surface_id, 61 SurfaceId* out_surface_id,
54 gfx::Transform* out_transform); 62 gfx::Transform* out_transform);
55 63
56 bool GetTransformToTargetSurfaceInternal( 64 bool GetTransformToTargetSurfaceInternal(
(...skipping 11 matching lines...) Expand all
68 const gfx::Point& point_in_render_pass_space, 76 const gfx::Point& point_in_render_pass_space,
69 gfx::Transform* target_to_quad_transform, 77 gfx::Transform* target_to_quad_transform,
70 gfx::Point* point_in_quad_space); 78 gfx::Point* point_in_quad_space);
71 79
72 SurfaceHittestDelegate* const delegate_; 80 SurfaceHittestDelegate* const delegate_;
73 SurfaceManager* const manager_; 81 SurfaceManager* const manager_;
74 }; 82 };
75 } // namespace cc 83 } // namespace cc
76 84
77 #endif // CC_SURFACES_SURFACE_HITTEST_H_ 85 #endif // CC_SURFACES_SURFACE_HITTEST_H_
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/surface_hittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698