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

Side by Side Diff: remoting/client/software_video_renderer.cc

Issue 628753002: replace OVERRIDE and FINAL with override and final in remoting/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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 | « remoting/client/software_video_renderer.h ('k') | remoting/client/token_fetcher_proxy.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "remoting/client/software_video_renderer.h" 5 #include "remoting/client/software_video_renderer.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 19 matching lines...) Expand all
30 // This class wraps a VideoDecoder and byte-swaps the pixels for compatibility 30 // This class wraps a VideoDecoder and byte-swaps the pixels for compatibility
31 // with the android.graphics.Bitmap class. 31 // with the android.graphics.Bitmap class.
32 // TODO(lambroslambrou): Refactor so that the VideoDecoder produces data 32 // TODO(lambroslambrou): Refactor so that the VideoDecoder produces data
33 // in the right byte-order, instead of swapping it here. 33 // in the right byte-order, instead of swapping it here.
34 class RgbToBgrVideoDecoderFilter : public VideoDecoder { 34 class RgbToBgrVideoDecoderFilter : public VideoDecoder {
35 public: 35 public:
36 RgbToBgrVideoDecoderFilter(scoped_ptr<VideoDecoder> parent) 36 RgbToBgrVideoDecoderFilter(scoped_ptr<VideoDecoder> parent)
37 : parent_(parent.Pass()) { 37 : parent_(parent.Pass()) {
38 } 38 }
39 39
40 virtual void Initialize(const webrtc::DesktopSize& screen_size) OVERRIDE { 40 virtual void Initialize(const webrtc::DesktopSize& screen_size) override {
41 parent_->Initialize(screen_size); 41 parent_->Initialize(screen_size);
42 } 42 }
43 43
44 virtual bool DecodePacket(const VideoPacket& packet) OVERRIDE { 44 virtual bool DecodePacket(const VideoPacket& packet) override {
45 return parent_->DecodePacket(packet); 45 return parent_->DecodePacket(packet);
46 } 46 }
47 47
48 virtual void Invalidate(const webrtc::DesktopSize& view_size, 48 virtual void Invalidate(const webrtc::DesktopSize& view_size,
49 const webrtc::DesktopRegion& region) OVERRIDE { 49 const webrtc::DesktopRegion& region) override {
50 return parent_->Invalidate(view_size, region); 50 return parent_->Invalidate(view_size, region);
51 } 51 }
52 52
53 virtual void RenderFrame(const webrtc::DesktopSize& view_size, 53 virtual void RenderFrame(const webrtc::DesktopSize& view_size,
54 const webrtc::DesktopRect& clip_area, 54 const webrtc::DesktopRect& clip_area,
55 uint8* image_buffer, 55 uint8* image_buffer,
56 int image_stride, 56 int image_stride,
57 webrtc::DesktopRegion* output_region) OVERRIDE { 57 webrtc::DesktopRegion* output_region) override {
58 parent_->RenderFrame(view_size, clip_area, image_buffer, image_stride, 58 parent_->RenderFrame(view_size, clip_area, image_buffer, image_stride,
59 output_region); 59 output_region);
60 60
61 for (webrtc::DesktopRegion::Iterator i(*output_region); !i.IsAtEnd(); 61 for (webrtc::DesktopRegion::Iterator i(*output_region); !i.IsAtEnd();
62 i.Advance()) { 62 i.Advance()) {
63 webrtc::DesktopRect rect = i.rect(); 63 webrtc::DesktopRect rect = i.rect();
64 uint8* pixels = image_buffer + (rect.top() * image_stride) + 64 uint8* pixels = image_buffer + (rect.top() * image_stride) +
65 (rect.left() * kBytesPerPixel); 65 (rect.left() * kBytesPerPixel);
66 libyuv::ABGRToARGB(pixels, image_stride, pixels, image_stride, 66 libyuv::ABGRToARGB(pixels, image_stride, pixels, image_stride,
67 rect.width(), rect.height()); 67 rect.width(), rect.height());
68 } 68 }
69 } 69 }
70 70
71 virtual const webrtc::DesktopRegion* GetImageShape() OVERRIDE { 71 virtual const webrtc::DesktopRegion* GetImageShape() override {
72 return parent_->GetImageShape(); 72 return parent_->GetImageShape();
73 } 73 }
74 74
75 private: 75 private:
76 scoped_ptr<VideoDecoder> parent_; 76 scoped_ptr<VideoDecoder> parent_;
77 }; 77 };
78 78
79 class SoftwareVideoRenderer::Core { 79 class SoftwareVideoRenderer::Core {
80 public: 80 public:
81 Core(scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 81 Core(scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 DCHECK(CalledOnValidThread()); 416 DCHECK(CalledOnValidThread());
417 417
418 // Record the latency between the packet being received and presented. 418 // Record the latency between the packet being received and presented.
419 stats_.video_decode_ms()->Record( 419 stats_.video_decode_ms()->Record(
420 (base::Time::Now() - decode_start).InMilliseconds()); 420 (base::Time::Now() - decode_start).InMilliseconds());
421 421
422 done.Run(); 422 done.Run();
423 } 423 }
424 424
425 } // namespace remoting 425 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/software_video_renderer.h ('k') | remoting/client/token_fetcher_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698