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

Side by Side Diff: content/browser/media/capture/aura_window_capture_machine.cc

Issue 1690013002: Remove --tab-capture-upscale/downscale-quality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Addressed Yuri's comments. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/media/capture/aura_window_capture_machine.h" 5 #include "content/browser/media/capture/aura_window_capture_machine.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 result->TakeTexture(&texture_mailbox, &release_callback); 265 result->TakeTexture(&texture_mailbox, &release_callback);
266 DCHECK(texture_mailbox.IsTexture()); 266 DCHECK(texture_mailbox.IsTexture());
267 if (!texture_mailbox.IsTexture()) 267 if (!texture_mailbox.IsTexture())
268 return false; 268 return false;
269 269
270 gfx::Rect result_rect(result->size()); 270 gfx::Rect result_rect(result->size());
271 if (!yuv_readback_pipeline_ || 271 if (!yuv_readback_pipeline_ ||
272 yuv_readback_pipeline_->scaler()->SrcSize() != result_rect.size() || 272 yuv_readback_pipeline_->scaler()->SrcSize() != result_rect.size() ||
273 yuv_readback_pipeline_->scaler()->SrcSubrect() != result_rect || 273 yuv_readback_pipeline_->scaler()->SrcSubrect() != result_rect ||
274 yuv_readback_pipeline_->scaler()->DstSize() != region_in_frame.size()) { 274 yuv_readback_pipeline_->scaler()->DstSize() != region_in_frame.size()) {
275 yuv_readback_pipeline_.reset( 275 yuv_readback_pipeline_.reset(gl_helper->CreateReadbackPipelineYUV(
276 gl_helper->CreateReadbackPipelineYUV(GLHelper::SCALER_QUALITY_FAST, 276 result_rect.size(), result_rect, region_in_frame.size(), true, true));
277 result_rect.size(),
278 result_rect,
279 region_in_frame.size(),
280 true,
281 true));
282 } 277 }
283 278
284 cursor_renderer_->SnapshotCursorState(region_in_frame); 279 cursor_renderer_->SnapshotCursorState(region_in_frame);
285 yuv_readback_pipeline_->ReadbackYUV( 280 yuv_readback_pipeline_->ReadbackYUV(
286 texture_mailbox.mailbox(), texture_mailbox.sync_token(), 281 texture_mailbox.mailbox(), texture_mailbox.sync_token(),
287 video_frame.get(), region_in_frame.origin(), 282 video_frame.get(), region_in_frame.origin(),
288 base::Bind(&CopyOutputFinishedForVideo, weak_factory_.GetWeakPtr(), 283 base::Bind(&CopyOutputFinishedForVideo, weak_factory_.GetWeakPtr(),
289 start_time, capture_frame_cb, video_frame, 284 start_time, capture_frame_cb, video_frame,
290 base::Passed(&release_callback))); 285 base::Passed(&release_callback)));
291 return true; 286 return true;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 // TODO(miu): The CopyOutputRequest should be made earlier, at WillCommit(). 355 // TODO(miu): The CopyOutputRequest should be made earlier, at WillCommit().
361 // http://crbug.com/492839 356 // http://crbug.com/492839
362 BrowserThread::PostTask( 357 BrowserThread::PostTask(
363 BrowserThread::UI, 358 BrowserThread::UI,
364 FROM_HERE, 359 FROM_HERE,
365 base::Bind(&AuraWindowCaptureMachine::Capture, weak_factory_.GetWeakPtr(), 360 base::Bind(&AuraWindowCaptureMachine::Capture, weak_factory_.GetWeakPtr(),
366 true)); 361 true));
367 } 362 }
368 363
369 } // namespace content 364 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698