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

Side by Side Diff: content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.h

Issue 2197613003: gpu: Introduce GpuChannelEstablishFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot merge Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 media::JpegDecodeAccelerator::Error error) override; 85 media::JpegDecodeAccelerator::Error error) override;
86 86
87 private: 87 private:
88 // Initialization helper, to establish GPU channel. 88 // Initialization helper, to establish GPU channel.
89 static void EstablishGpuChannelOnUIThread( 89 static void EstablishGpuChannelOnUIThread(
90 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 90 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
91 base::WeakPtr<VideoCaptureGpuJpegDecoder> weak_this); 91 base::WeakPtr<VideoCaptureGpuJpegDecoder> weak_this);
92 92
93 static void GpuChannelEstablishedOnUIThread( 93 static void GpuChannelEstablishedOnUIThread(
94 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 94 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
95 base::WeakPtr<VideoCaptureGpuJpegDecoder> weak_this); 95 base::WeakPtr<VideoCaptureGpuJpegDecoder> weak_this,
96 scoped_refptr<gpu::GpuChannelHost> established_channel_host);
96 97
97 void FinishInitialization( 98 void FinishInitialization(
98 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host); 99 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host);
99 100
100 // Returns true if the decoding of last frame is not finished yet. 101 // Returns true if the decoding of last frame is not finished yet.
101 bool IsDecoding_Locked() const; 102 bool IsDecoding_Locked() const;
102 103
103 // Records |decoder_status_| to histogram. 104 // Records |decoder_status_| to histogram.
104 void RecordInitDecodeUMA_Locked(); 105 void RecordInitDecodeUMA_Locked();
105 106
(...skipping 22 matching lines...) Expand all
128 std::unique_ptr<base::SharedMemory> in_shared_memory_; 129 std::unique_ptr<base::SharedMemory> in_shared_memory_;
129 130
130 STATUS decoder_status_; 131 STATUS decoder_status_;
131 132
132 DISALLOW_COPY_AND_ASSIGN(VideoCaptureGpuJpegDecoder); 133 DISALLOW_COPY_AND_ASSIGN(VideoCaptureGpuJpegDecoder);
133 }; 134 };
134 135
135 } // namespace content 136 } // namespace content
136 137
137 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_ 138 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698