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

Side by Side Diff: content/browser/compositor/delegated_frame_host.cc

Issue 1255483004: Implement surface-based browser process hit testing for Mac and Aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disabled test on Android (not implemented there) Created 5 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "content/browser/compositor/delegated_frame_host.h" 5 #include "content/browser/compositor/delegated_frame_host.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/time/default_tick_clock.h" 9 #include "base/time/default_tick_clock.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 uint32_t DelegatedFrameHost::GetSurfaceIdNamespace() { 201 uint32_t DelegatedFrameHost::GetSurfaceIdNamespace() {
202 if (!use_surfaces_) 202 if (!use_surfaces_)
203 return 0; 203 return 0;
204 204
205 return id_allocator_->id_namespace(); 205 return id_allocator_->id_namespace();
206 } 206 }
207 207
208 cc::SurfaceId DelegatedFrameHost::SurfaceIdAtPoint( 208 cc::SurfaceId DelegatedFrameHost::SurfaceIdAtPoint(
209 const gfx::Point& point, 209 const gfx::Point& point,
210 gfx::Point* transformed_point) { 210 gfx::Point* transformed_point) {
211 if (surface_id_.is_null())
212 return surface_id_;
211 cc::SurfaceHittest hittest(GetSurfaceManager()); 213 cc::SurfaceHittest hittest(GetSurfaceManager());
212 return hittest.Hittest(surface_id_, point, transformed_point); 214 return hittest.Hittest(surface_id_, point, transformed_point);
213 } 215 }
214 216
215 bool DelegatedFrameHost::ShouldSkipFrame(gfx::Size size_in_dip) const { 217 bool DelegatedFrameHost::ShouldSkipFrame(gfx::Size size_in_dip) const {
216 // Should skip a frame only when another frame from the renderer is guaranteed 218 // Should skip a frame only when another frame from the renderer is guaranteed
217 // to replace it. Otherwise may cause hangs when the renderer is waiting for 219 // to replace it. Otherwise may cause hangs when the renderer is waiting for
218 // the completion of latency infos (such as when taking a Snapshot.) 220 // the completion of latency infos (such as when taking a Snapshot.)
219 if (can_lock_compositor_ == NO_PENDING_RENDERER_FRAME || 221 if (can_lock_compositor_ == NO_PENDING_RENDERER_FRAME ||
220 can_lock_compositor_ == NO_PENDING_COMMIT || 222 can_lock_compositor_ == NO_PENDING_COMMIT ||
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 cc::SurfaceManager* manager = factory->GetSurfaceManager(); 1031 cc::SurfaceManager* manager = factory->GetSurfaceManager();
1030 new_layer->SetShowSurface( 1032 new_layer->SetShowSurface(
1031 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), 1033 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)),
1032 base::Bind(&RequireCallback, base::Unretained(manager)), 1034 base::Bind(&RequireCallback, base::Unretained(manager)),
1033 current_surface_size_, current_scale_factor_, 1035 current_surface_size_, current_scale_factor_,
1034 current_frame_size_in_dip_); 1036 current_frame_size_in_dip_);
1035 } 1037 }
1036 } 1038 }
1037 1039
1038 } // namespace content 1040 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/delegated_frame_host.h ('k') | content/browser/frame_host/cross_process_frame_connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698