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

Unified Diff: ash/laser/laser_pointer_view.cc

Issue 2755463002: [cc] Fix CompositorFrameSinkSupport BeginFrameAck interface. (Closed)
Patch Set: add BeginFrameDidNotSwap to MojoCFS. Created 3 years, 9 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
Index: ash/laser/laser_pointer_view.cc
diff --git a/ash/laser/laser_pointer_view.cc b/ash/laser/laser_pointer_view.cc
index d567506ef0ace5cd4a0bf9c863dea651d0e14a59..8db900d4e55318b168cfaf7f767d2e7bb3f0ad9f 100644
--- a/ash/laser/laser_pointer_view.cc
+++ b/ash/laser/laser_pointer_view.cc
@@ -21,6 +21,7 @@
#include "base/threading/thread_task_runner_handle.h"
#include "base/timer/timer.h"
#include "base/trace_event/trace_event.h"
+#include "cc/output/begin_frame_args.h"
#include "cc/output/context_provider.h"
#include "cc/quads/texture_draw_quad.h"
#include "cc/resources/transferable_resource.h"
@@ -390,6 +391,11 @@ void LaserPointerView::SubmitCompositorFrame(
frame_sink_support_.SubmitCompositorFrame(local_surface_id, std::move(frame));
}
+void LaserPointerView::BeginFrameDidNotSwap(
+ const cc::BeginFrameAck& begin_frame_ack) {
+ frame_sink_support_.BeginFrameDidNotSwap(begin_frame_ack);
+}
+
void LaserPointerView::EvictFrame() {
frame_sink_support_.EvictFrame();
}
@@ -678,6 +684,12 @@ void LaserPointerView::UpdateSurface() {
quad_state->opacity = 1.0f;
cc::CompositorFrame frame;
+ // TODO(eseckler): LaserPointerView should use BeginFrames and set the ack
+ // accordingly.
+ frame.metadata.begin_frame_ack =
+ cc::BeginFrameAck(cc::BeginFrameArgs::kManualSourceId,
+ cc::BeginFrameArgs::kStartingFrameNumber,
+ cc::BeginFrameArgs::kStartingFrameNumber, 0, true);
cc::TextureDrawQuad* texture_quad =
render_pass->CreateAndAppendDrawQuad<cc::TextureDrawQuad>();
float vertex_opacity[4] = {1.0, 1.0, 1.0, 1.0};

Powered by Google App Engine
This is Rietveld 408576698