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

Side by Side Diff: content/common/gpu/client/gpu_jpeg_decode_accelerator_host.cc

Issue 1815563004: Remove iOS ifdefs in src/content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 9 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/common/child_process_host_impl.cc ('k') | content/public/app/content_main_delegate.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 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 #include "content/common/gpu/client/gpu_jpeg_decode_accelerator_host.h" 5 #include "content/common/gpu/client/gpu_jpeg_decode_accelerator_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 channel_->ShareToGpuProcess(bitstream_buffer.handle()); 157 channel_->ShareToGpuProcess(bitstream_buffer.handle());
158 if (!base::SharedMemory::IsHandleValid(input_handle)) { 158 if (!base::SharedMemory::IsHandleValid(input_handle)) {
159 DLOG(ERROR) << "Failed to duplicate handle of BitstreamBuffer"; 159 DLOG(ERROR) << "Failed to duplicate handle of BitstreamBuffer";
160 return; 160 return;
161 } 161 }
162 decode_params.input_buffer.set_handle(input_handle); 162 decode_params.input_buffer.set_handle(input_handle);
163 base::SharedMemoryHandle output_handle = 163 base::SharedMemoryHandle output_handle =
164 channel_->ShareToGpuProcess(video_frame->shared_memory_handle()); 164 channel_->ShareToGpuProcess(video_frame->shared_memory_handle());
165 if (!base::SharedMemory::IsHandleValid(output_handle)) { 165 if (!base::SharedMemory::IsHandleValid(output_handle)) {
166 DLOG(ERROR) << "Failed to duplicate handle of VideoFrame"; 166 DLOG(ERROR) << "Failed to duplicate handle of VideoFrame";
167 #if defined(OS_POSIX) && !(defined(OS_MACOSX) && !defined(OS_IOS)) 167 #if defined(OS_POSIX) && !defined(OS_MACOSX)
168 if (input_handle.auto_close) { 168 if (input_handle.auto_close) {
169 // Defer closing task to the ScopedFD. 169 // Defer closing task to the ScopedFD.
170 base::ScopedFD(input_handle.fd); 170 base::ScopedFD(input_handle.fd);
171 } 171 }
172 #else 172 #else
173 // TODO(kcwu) fix the handle leak after crbug.com/493414 resolved. 173 // TODO(kcwu) fix the handle leak after crbug.com/493414 resolved.
174 #endif 174 #endif
175 return; 175 return;
176 } 176 }
177 177
(...skipping 17 matching lines...) Expand all
195 if (!channel_->Send(message)) { 195 if (!channel_->Send(message)) {
196 DLOG(ERROR) << "Send(" << message->type() << ") failed"; 196 DLOG(ERROR) << "Send(" << message->type() << ") failed";
197 } 197 }
198 } 198 }
199 199
200 base::WeakPtr<IPC::Listener> GpuJpegDecodeAcceleratorHost::GetReceiver() { 200 base::WeakPtr<IPC::Listener> GpuJpegDecodeAcceleratorHost::GetReceiver() {
201 return receiver_->AsWeakPtrForIO(); 201 return receiver_->AsWeakPtrForIO();
202 } 202 }
203 203
204 } // namespace content 204 } // namespace content
OLDNEW
« no previous file with comments | « content/common/child_process_host_impl.cc ('k') | content/public/app/content_main_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698