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

Side by Side Diff: ui/gl/gl_image_io_surface.mm

Issue 2102883003: [Merge to 2774] Don't check IOSurfaceIsInUse for IOSurfaces wrapped in a CVPixelBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2774
Patch Set: Created 4 years, 5 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 | « ui/gl/gl_image_io_surface.h ('k') | no next file » | 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 "ui/gl/gl_image_io_surface.h" 5 #include "ui/gl/gl_image_io_surface.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/mac/bind_objc_block.h" 10 #include "base/mac/bind_objc_block.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 auto guid = 357 auto guid =
358 GetGenericSharedMemoryGUIDForTracing(process_tracing_id, io_surface_id_); 358 GetGenericSharedMemoryGUIDForTracing(process_tracing_id, io_surface_id_);
359 pmd->CreateSharedGlobalAllocatorDump(guid); 359 pmd->CreateSharedGlobalAllocatorDump(guid);
360 pmd->AddOwnershipEdge(dump->guid(), guid); 360 pmd->AddOwnershipEdge(dump->guid(), guid);
361 } 361 }
362 362
363 bool GLImageIOSurface::EmulatingRGB() const { 363 bool GLImageIOSurface::EmulatingRGB() const {
364 return client_internalformat_ == GL_RGB; 364 return client_internalformat_ == GL_RGB;
365 } 365 }
366 366
367 bool GLImageIOSurface::CanCheckIOSurfaceIsInUse() const {
368 return !cv_pixel_buffer_;
369 }
370
367 base::ScopedCFTypeRef<IOSurfaceRef> GLImageIOSurface::io_surface() { 371 base::ScopedCFTypeRef<IOSurfaceRef> GLImageIOSurface::io_surface() {
368 return io_surface_; 372 return io_surface_;
369 } 373 }
370 374
371 base::ScopedCFTypeRef<CVPixelBufferRef> GLImageIOSurface::cv_pixel_buffer() { 375 base::ScopedCFTypeRef<CVPixelBufferRef> GLImageIOSurface::cv_pixel_buffer() {
372 return cv_pixel_buffer_; 376 return cv_pixel_buffer_;
373 } 377 }
374 378
375 // static 379 // static
376 unsigned GLImageIOSurface::GetInternalFormatForTesting( 380 unsigned GLImageIOSurface::GetInternalFormatForTesting(
377 gfx::BufferFormat format) { 381 gfx::BufferFormat format) {
378 DCHECK(ValidFormat(format)); 382 DCHECK(ValidFormat(format));
379 return TextureFormat(format); 383 return TextureFormat(format);
380 } 384 }
381 } // namespace gl 385 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_image_io_surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698