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

Unified Diff: content/browser/media/capture/aura_window_capture_machine.h

Issue 1942493002: Short-term fix for Aura Desktop/Window capture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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 | « no previous file | content/browser/media/capture/aura_window_capture_machine.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/capture/aura_window_capture_machine.h
diff --git a/content/browser/media/capture/aura_window_capture_machine.h b/content/browser/media/capture/aura_window_capture_machine.h
index 25ced7a47a4c80617904beb78ed68fedc5261b05..ca9e09e446378851af04667f4e8aa6e48ec43db9 100644
--- a/content/browser/media/capture/aura_window_capture_machine.h
+++ b/content/browser/media/capture/aura_window_capture_machine.h
@@ -15,6 +15,7 @@
#include "ui/aura/window_observer.h"
#include "ui/base/cursor/cursors_aura.h"
#include "ui/compositor/compositor.h"
+#include "ui/compositor/compositor_animation_observer.h"
namespace cc {
@@ -30,7 +31,7 @@ class ReadbackYUVInterface;
class AuraWindowCaptureMachine
: public media::VideoCaptureMachine,
public aura::WindowObserver,
- public ui::CompositorObserver {
+ public ui::CompositorAnimationObserver {
public:
AuraWindowCaptureMachine();
~AuraWindowCaptureMachine() override;
@@ -51,14 +52,9 @@ class AuraWindowCaptureMachine
void OnWindowRemovingFromRootWindow(aura::Window* window,
aura::Window* new_root) override;
- // Implements ui::CompositorObserver.
- void OnCompositingDidCommit(ui::Compositor* compositor) override {}
- void OnCompositingStarted(ui::Compositor* compositor,
- base::TimeTicks start_time) override {}
- void OnCompositingEnded(ui::Compositor* compositor) override;
- void OnCompositingAborted(ui::Compositor* compositor) override {}
- void OnCompositingLockStateChanged(ui::Compositor* compositor) override {}
- void OnCompositingShuttingDown(ui::Compositor* compositor) override {}
+ // ui::CompositorAnimationObserver implementation.
+ void OnAnimationStep(base::TimeTicks timestamp) override;
+ void OnCompositingShuttingDown(ui::Compositor* compositor) override;
// Sets the window to use for capture.
void SetWindow(aura::Window* window);
@@ -69,9 +65,9 @@ class AuraWindowCaptureMachine
const media::VideoCaptureParams& params);
void InternalStop(const base::Closure& callback);
- // Captures a frame.
- // |dirty| is false for refresh requests and true for compositor updates.
- void Capture(bool dirty);
+ // Captures a frame. |event_time| is provided by the compositor, or is null
+ // for refresh requests.
+ void Capture(base::TimeTicks event_time);
// Update capture size. Must be called on the UI thread.
void UpdateCaptureSize();
@@ -81,6 +77,7 @@ class AuraWindowCaptureMachine
// Response callback for cc::Layer::RequestCopyOfOutput().
void DidCopyOutput(scoped_refptr<media::VideoFrame> video_frame,
+ base::TimeTicks event_time,
base::TimeTicks start_time,
const CaptureFrameCallback& capture_frame_cb,
std::unique_ptr<cc::CopyOutputResult> result);
@@ -90,14 +87,14 @@ class AuraWindowCaptureMachine
// false on error, and |capture_frame_cb| should be run by the caller (with
// failure status).
bool ProcessCopyOutputResponse(scoped_refptr<media::VideoFrame> video_frame,
- base::TimeTicks start_time,
+ base::TimeTicks event_time,
const CaptureFrameCallback& capture_frame_cb,
std::unique_ptr<cc::CopyOutputResult> result);
// Renders the cursor if needed and then delivers the captured frame.
static void CopyOutputFinishedForVideo(
base::WeakPtr<AuraWindowCaptureMachine> machine,
- base::TimeTicks start_time,
+ base::TimeTicks event_time,
const CaptureFrameCallback& capture_frame_cb,
const scoped_refptr<media::VideoFrame>& target,
std::unique_ptr<cc::SingleReleaseCallback> release_callback,
« no previous file with comments | « no previous file | content/browser/media/capture/aura_window_capture_machine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698