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

Unified Diff: cc/surfaces/surface_hittest.cc

Issue 2503203002: Revert "Getting rid of DelegatedFrameData" (Closed)
Patch Set: Created 4 years, 1 month 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_factory_unittest.cc ('k') | cc/surfaces/surface_hittest_unittest.cc » ('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 3ed99c0bea804cbbc50071b80894804c08eabb1b..e4605bdf8eeba6677d39512d2239965c8e879313 100644
--- a/cc/surfaces/surface_hittest.cc
+++ b/cc/surfaces/surface_hittest.cc
@@ -5,6 +5,7 @@
#include "cc/surfaces/surface_hittest.h"
#include "cc/output/compositor_frame.h"
+#include "cc/output/delegated_frame_data.h"
#include "cc/quads/draw_quad.h"
#include "cc/quads/render_pass_draw_quad.h"
#include "cc/quads/surface_draw_quad.h"
@@ -258,17 +259,20 @@ const RenderPass* SurfaceHittest::GetRenderPassForSurfaceById(
Surface* surface = manager_->GetSurfaceForId(surface_id);
if (!surface)
return nullptr;
- if (!surface->HasFrame())
- return nullptr;
+
const CompositorFrame& surface_frame = surface->GetEligibleFrame();
+ if (!surface_frame.delegated_frame_data)
+ return nullptr;
- if (surface_frame.render_pass_list.empty())
+ const DelegatedFrameData* frame_data =
+ surface_frame.delegated_frame_data.get();
+ if (frame_data->render_pass_list.empty())
return nullptr;
if (!render_pass_id.IsValid())
- return surface_frame.render_pass_list.back().get();
+ return frame_data->render_pass_list.back().get();
- for (const auto& render_pass : surface_frame.render_pass_list) {
+ for (const auto& render_pass : frame_data->render_pass_list) {
if (render_pass->id == render_pass_id)
return render_pass.get();
}
« no previous file with comments | « cc/surfaces/surface_factory_unittest.cc ('k') | cc/surfaces/surface_hittest_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698