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

Side by Side Diff: cc/resources/resource_provider.h

Issue 1688953002: Mac: Suppress asserts about resources being in use (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missed function Created 4 years, 10 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 | « cc/resources/resource_pool.cc ('k') | cc/resources/resource_provider.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 CC_RESOURCES_RESOURCE_PROVIDER_H_ 5 #ifndef CC_RESOURCES_RESOURCE_PROVIDER_H_
6 #define CC_RESOURCES_RESOURCE_PROVIDER_H_ 6 #define CC_RESOURCES_RESOURCE_PROVIDER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 void CreateForTesting(ResourceId id); 414 void CreateForTesting(ResourceId id);
415 415
416 // Sets the current read fence. If a resource is locked for read 416 // Sets the current read fence. If a resource is locked for read
417 // and has read fences enabled, the resource will not allow writes 417 // and has read fences enabled, the resource will not allow writes
418 // until this fence has passed. 418 // until this fence has passed.
419 void SetReadLockFence(Fence* fence) { current_read_lock_fence_ = fence; } 419 void SetReadLockFence(Fence* fence) { current_read_lock_fence_ = fence; }
420 420
421 // Indicates if we can currently lock this resource for write. 421 // Indicates if we can currently lock this resource for write.
422 bool CanLockForWrite(ResourceId id); 422 bool CanLockForWrite(ResourceId id);
423 423
424 // Indicates if this resource is currently being used as an overlay by the
425 // windowing system.
426 // TODO(ccameron): This should be entirely hidden inside CanLockForWrite, but
427 // will erratically returns true, potentially breaking DCHECKs.
428 // http://crbug.com/577121
429 bool IsInUseByMacOSWindowServer(ResourceId id);
430
424 // Indicates if this resource may be used for a hardware overlay plane. 431 // Indicates if this resource may be used for a hardware overlay plane.
425 bool IsOverlayCandidate(ResourceId id); 432 bool IsOverlayCandidate(ResourceId id);
426 433
427 void WaitSyncTokenIfNeeded(ResourceId id); 434 void WaitSyncTokenIfNeeded(ResourceId id);
428 435
429 static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl); 436 static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl);
430 437
431 OutputSurface* output_surface() { return output_surface_; } 438 OutputSurface* output_surface() { return output_surface_; }
432 439
433 void ValidateResource(ResourceId id) const; 440 void ValidateResource(ResourceId id) const;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 // A process-unique ID used for disambiguating memory dumps from different 622 // A process-unique ID used for disambiguating memory dumps from different
616 // resource providers. 623 // resource providers.
617 int tracing_id_; 624 int tracing_id_;
618 625
619 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); 626 DISALLOW_COPY_AND_ASSIGN(ResourceProvider);
620 }; 627 };
621 628
622 } // namespace cc 629 } // namespace cc
623 630
624 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 631 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW
« no previous file with comments | « cc/resources/resource_pool.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698