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

Unified Diff: content/browser/media/capture/content_video_capture_device_core.cc

Issue 418283003: "Buttery Smooth" Tab Capture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Un-inline some methods, plus REBASE. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/media/capture/content_video_capture_device_core.cc
diff --git a/content/browser/media/capture/content_video_capture_device_core.cc b/content/browser/media/capture/content_video_capture_device_core.cc
index 6878652de0736683eeca1bfa3f6b6a58763ae3e8..8152b3dbe0e9cc19636190fff20137c9555ec88f 100644
--- a/content/browser/media/capture/content_video_capture_device_core.cc
+++ b/content/browser/media/capture/content_video_capture_device_core.cc
@@ -66,6 +66,7 @@ ThreadSafeCaptureOracle::~ThreadSafeCaptureOracle() {}
bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
VideoCaptureOracle::Event event,
+ const gfx::Rect& damage_rect,
base::TimeTicks event_time,
scoped_refptr<media::VideoFrame>* storage,
CaptureFrameCallback* callback) {
@@ -78,7 +79,7 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
client_->ReserveOutputBuffer(video_frame_format_,
params_.requested_format.frame_size);
const bool should_capture =
- oracle_->ObserveEventAndDecideCapture(event, event_time);
+ oracle_->ObserveEventAndDecideCapture(event, damage_rect, event_time);
const bool content_is_dirty =
(event == VideoCaptureOracle::kCompositorUpdate ||
event == VideoCaptureOracle::kSoftwarePaint);
@@ -90,7 +91,7 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
// Consider the various reasons not to initiate a capture.
if (should_capture && !output_buffer) {
TRACE_EVENT_INSTANT1("mirroring",
- "EncodeLimited",
+ "PipelineLimited",
TRACE_EVENT_SCOPE_THREAD,
"trigger",
event_name);
@@ -108,7 +109,7 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
} else if (!should_capture && !output_buffer) {
// We decided not to capture, but we wouldn't have been able to if we wanted
// to because no output buffer was available.
- TRACE_EVENT_INSTANT1("mirroring", "NearlyEncodeLimited",
+ TRACE_EVENT_INSTANT1("mirroring", "NearlyPipelineLimited",
TRACE_EVENT_SCOPE_THREAD,
"trigger", event_name);
return false;
@@ -192,7 +193,7 @@ void ThreadSafeCaptureOracle::DidCaptureFrame(
return; // Capture is stopped.
if (success) {
- if (oracle_->CompleteCapture(frame_number, timestamp)) {
+ if (oracle_->CompleteCapture(frame_number, &timestamp)) {
media::VideoCaptureFormat format = params_.requested_format;
format.frame_size = frame->coded_size();
client_->OnIncomingCapturedVideoFrame(buffer, format, frame, timestamp);

Powered by Google App Engine
This is Rietveld 408576698