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

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

Issue 1984873002: Add logic to ResourceProvider to correctly lock GpuMemoryBuffer Resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/output/gl_renderer.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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 ResourceId resource_id); 339 ResourceId resource_id);
340 ~ScopedReadLockGpuMemoryBuffer(); 340 ~ScopedReadLockGpuMemoryBuffer();
341 341
342 // This may return nullptr. 342 // This may return nullptr.
343 gfx::GpuMemoryBuffer* GetGpuMemoryBuffer() const; 343 gfx::GpuMemoryBuffer* GetGpuMemoryBuffer() const;
344 344
345 // This returns the GL texture that is backed by a GL image bound to the 345 // This returns the GL texture that is backed by a GL image bound to the
346 // resource's GpuMemoryBuffer. 346 // resource's GpuMemoryBuffer.
347 unsigned GetTextureId() const; 347 unsigned GetTextureId() const;
348 348
349 ResourceId GetResourceId() const;
350
349 private: 351 private:
350 ResourceProvider* resource_provider_; 352 ResourceProvider* resource_provider_;
351 ResourceId resource_id_; 353 ResourceId resource_id_;
352 const ResourceProvider::Resource* resource_; 354 const ResourceProvider::Resource* resource_;
353 base::ThreadChecker thread_checker_; 355 base::ThreadChecker thread_checker_;
354 356
355 DISALLOW_COPY_AND_ASSIGN(ScopedReadLockGpuMemoryBuffer); 357 DISALLOW_COPY_AND_ASSIGN(ScopedReadLockGpuMemoryBuffer);
356 }; 358 };
357 359
358 class CC_EXPORT ScopedWriteLockGr { 360 class CC_EXPORT ScopedWriteLockGr {
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 // A process-unique ID used for disambiguating memory dumps from different 707 // A process-unique ID used for disambiguating memory dumps from different
706 // resource providers. 708 // resource providers.
707 int tracing_id_; 709 int tracing_id_;
708 710
709 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); 711 DISALLOW_COPY_AND_ASSIGN(ResourceProvider);
710 }; 712 };
711 713
712 } // namespace cc 714 } // namespace cc
713 715
714 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 716 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698