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

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

Issue 2006153002: Revert of 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
351 private: 349 private:
352 ResourceProvider* resource_provider_; 350 ResourceProvider* resource_provider_;
353 ResourceId resource_id_; 351 ResourceId resource_id_;
354 const ResourceProvider::Resource* resource_; 352 const ResourceProvider::Resource* resource_;
355 base::ThreadChecker thread_checker_; 353 base::ThreadChecker thread_checker_;
356 354
357 DISALLOW_COPY_AND_ASSIGN(ScopedReadLockGpuMemoryBuffer); 355 DISALLOW_COPY_AND_ASSIGN(ScopedReadLockGpuMemoryBuffer);
358 }; 356 };
359 357
360 class CC_EXPORT ScopedWriteLockGr { 358 class CC_EXPORT ScopedWriteLockGr {
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 // A process-unique ID used for disambiguating memory dumps from different 705 // A process-unique ID used for disambiguating memory dumps from different
708 // resource providers. 706 // resource providers.
709 int tracing_id_; 707 int tracing_id_;
710 708
711 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); 709 DISALLOW_COPY_AND_ASSIGN(ResourceProvider);
712 }; 710 };
713 711
714 } // namespace cc 712 } // namespace cc
715 713
716 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 714 #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