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

Side by Side Diff: content/renderer/media/webmediaplayer_ms.cc

Issue 2697663002: Clean up naming of paint-related identifiers (Closed)
Patch Set: Rebase Created 3 years, 10 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
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.h ('k') | content/renderer/sad_plugin.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/media/webmediaplayer_ms.h" 5 #include "content/renderer/media/webmediaplayer_ms.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 return blink::WebTimeRanges(); 435 return blink::WebTimeRanges();
436 } 436 }
437 437
438 bool WebMediaPlayerMS::didLoadingProgress() { 438 bool WebMediaPlayerMS::didLoadingProgress() {
439 DCHECK(thread_checker_.CalledOnValidThread()); 439 DCHECK(thread_checker_.CalledOnValidThread());
440 return true; 440 return true;
441 } 441 }
442 442
443 void WebMediaPlayerMS::paint(blink::WebCanvas* canvas, 443 void WebMediaPlayerMS::paint(blink::WebCanvas* canvas,
444 const blink::WebRect& rect, 444 const blink::WebRect& rect,
445 cc::PaintFlags& paint) { 445 cc::PaintFlags& flags) {
446 DVLOG(3) << __func__; 446 DVLOG(3) << __func__;
447 DCHECK(thread_checker_.CalledOnValidThread()); 447 DCHECK(thread_checker_.CalledOnValidThread());
448 448
449 const scoped_refptr<media::VideoFrame> frame = 449 const scoped_refptr<media::VideoFrame> frame =
450 compositor_->GetCurrentFrameWithoutUpdatingStatistics(); 450 compositor_->GetCurrentFrameWithoutUpdatingStatistics();
451 451
452 media::Context3D context_3d; 452 media::Context3D context_3d;
453 if (frame && frame->HasTextures()) { 453 if (frame && frame->HasTextures()) {
454 auto* provider = 454 auto* provider =
455 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); 455 RenderThreadImpl::current()->SharedMainThreadContextProvider().get();
456 // GPU Process crashed. 456 // GPU Process crashed.
457 if (!provider) 457 if (!provider)
458 return; 458 return;
459 context_3d = media::Context3D(provider->ContextGL(), provider->GrContext()); 459 context_3d = media::Context3D(provider->ContextGL(), provider->GrContext());
460 DCHECK(context_3d.gl); 460 DCHECK(context_3d.gl);
461 } 461 }
462 const gfx::RectF dest_rect(rect.x, rect.y, rect.width, rect.height); 462 const gfx::RectF dest_rect(rect.x, rect.y, rect.width, rect.height);
463 video_renderer_.Paint(frame, canvas, dest_rect, paint, 463 video_renderer_.Paint(frame, canvas, dest_rect, flags, video_rotation_,
464 video_rotation_, context_3d); 464 context_3d);
465 } 465 }
466 466
467 bool WebMediaPlayerMS::hasSingleSecurityOrigin() const { 467 bool WebMediaPlayerMS::hasSingleSecurityOrigin() const {
468 DCHECK(thread_checker_.CalledOnValidThread()); 468 DCHECK(thread_checker_.CalledOnValidThread());
469 return true; 469 return true;
470 } 470 }
471 471
472 bool WebMediaPlayerMS::didPassCORSAccessCheck() const { 472 bool WebMediaPlayerMS::didPassCORSAccessCheck() const {
473 DCHECK(thread_checker_.CalledOnValidThread()); 473 DCHECK(thread_checker_.CalledOnValidThread());
474 return true; 474 return true;
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 void WebMediaPlayerMS::ResetCanvasCache() { 696 void WebMediaPlayerMS::ResetCanvasCache() {
697 DCHECK(thread_checker_.CalledOnValidThread()); 697 DCHECK(thread_checker_.CalledOnValidThread());
698 video_renderer_.ResetCache(); 698 video_renderer_.ResetCache();
699 } 699 }
700 700
701 void WebMediaPlayerMS::TriggerResize() { 701 void WebMediaPlayerMS::TriggerResize() {
702 get_client()->sizeChanged(); 702 get_client()->sizeChanged();
703 } 703 }
704 704
705 } // namespace content 705 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.h ('k') | content/renderer/sad_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698