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

Side by Side Diff: content/common/gpu/gpu_memory_buffer_factory_io_surface.cc

Issue 1822153002: Attempt at suspend fix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | content/common/gpu/media/vt_video_decode_accelerator_mac.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 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 "content/common/gpu/gpu_memory_buffer_factory_io_surface.h" 5 #include "content/common/gpu/gpu_memory_buffer_factory_io_surface.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/gfx/buffer_format_util.h" 10 #include "ui/gfx/buffer_format_util.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 base::AutoLock lock(io_surfaces_lock_); 104 base::AutoLock lock(io_surfaces_lock_);
105 105
106 DCHECK_EQ(handle.type, gfx::IO_SURFACE_BUFFER); 106 DCHECK_EQ(handle.type, gfx::IO_SURFACE_BUFFER);
107 IOSurfaceMapKey key(handle.id, client_id); 107 IOSurfaceMapKey key(handle.id, client_id);
108 IOSurfaceMap::iterator it = io_surfaces_.find(key); 108 IOSurfaceMap::iterator it = io_surfaces_.find(key);
109 if (it == io_surfaces_.end()) 109 if (it == io_surfaces_.end())
110 return scoped_refptr<gl::GLImage>(); 110 return scoped_refptr<gl::GLImage>();
111 111
112 scoped_refptr<gl::GLImageIOSurface> image( 112 scoped_refptr<gl::GLImageIOSurface> image(
113 new gl::GLImageIOSurface(size, internalformat)); 113 new gl::GLImageIOSurface(size, internalformat));
114 if (!image->Initialize(it->second.get(), handle.id, format)) 114 if (!image->Initialize(it->second.get(), nullptr, handle.id, format))
115 return scoped_refptr<gl::GLImage>(); 115 return scoped_refptr<gl::GLImage>();
116 116
117 return image; 117 return image;
118 } 118 }
119 119
120 } // namespace content 120 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/media/vt_video_decode_accelerator_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698