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

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

Issue 2017473002: cc: Lock resources directly in CALayerOverlay (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
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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 ScopedReadLockGpuMemoryBuffer(ResourceProvider* resource_provider, 338 ScopedReadLockGpuMemoryBuffer(ResourceProvider* resource_provider,
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
349 ResourceId GetResourceId() const; 348 ResourceId GetResourceId() const;
349 bool IsOverlayCandidate() const;
erikchen 2016/05/26 00:32:01 not necessary if you choose to follow my suggestio
350 350
351 private: 351 private:
352 ResourceProvider* resource_provider_; 352 ResourceProvider* resource_provider_;
353 ResourceId resource_id_; 353 ResourceId resource_id_;
354 const ResourceProvider::Resource* resource_; 354 const ResourceProvider::Resource* resource_;
355 base::ThreadChecker thread_checker_; 355 base::ThreadChecker thread_checker_;
356 356
357 DISALLOW_COPY_AND_ASSIGN(ScopedReadLockGpuMemoryBuffer); 357 DISALLOW_COPY_AND_ASSIGN(ScopedReadLockGpuMemoryBuffer);
358 }; 358 };
359 359
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 // A process-unique ID used for disambiguating memory dumps from different 700 // A process-unique ID used for disambiguating memory dumps from different
701 // resource providers. 701 // resource providers.
702 int tracing_id_; 702 int tracing_id_;
703 703
704 DISALLOW_COPY_AND_ASSIGN(ResourceProvider); 704 DISALLOW_COPY_AND_ASSIGN(ResourceProvider);
705 }; 705 };
706 706
707 } // namespace cc 707 } // namespace cc
708 708
709 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 709 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698