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

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

Issue 1096703006: cc: Some more cleanup and removing TODOs for validating resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 void CopyResource(ResourceId source_id, ResourceId dest_id); 427 void CopyResource(ResourceId source_id, ResourceId dest_id);
428 428
429 void WaitSyncPointIfNeeded(ResourceId id); 429 void WaitSyncPointIfNeeded(ResourceId id);
430 430
431 void WaitReadLockIfNeeded(ResourceId id); 431 void WaitReadLockIfNeeded(ResourceId id);
432 432
433 static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl); 433 static GLint GetActiveTextureUnit(gpu::gles2::GLES2Interface* gl);
434 434
435 OutputSurface* output_surface() { return output_surface_; } 435 OutputSurface* output_surface() { return output_surface_; }
436 436
437 void ValidateResource(ResourceId id); 437 void ValidateResource(ResourceId id) const;
438 438
439 private: 439 private:
440 struct Resource { 440 struct Resource {
441 enum Origin { INTERNAL, EXTERNAL, DELEGATED }; 441 enum Origin { INTERNAL, EXTERNAL, DELEGATED };
442 442
443 ~Resource(); 443 ~Resource();
444 Resource(unsigned texture_id, 444 Resource(unsigned texture_id,
445 const gfx::Size& size, 445 const gfx::Size& size,
446 Origin origin, 446 Origin origin,
447 GLenum target, 447 GLenum target,
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 return format_gl_data_format[format]; 658 return format_gl_data_format[format];
659 } 659 }
660 660
661 inline GLenum GLInternalFormat(ResourceFormat format) { 661 inline GLenum GLInternalFormat(ResourceFormat format) {
662 return GLDataFormat(format); 662 return GLDataFormat(format);
663 } 663 }
664 664
665 } // namespace cc 665 } // namespace cc
666 666
667 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 667 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698