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

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

Issue 132873006: cc: Add zero-copy texture update support to delegating renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review feedback and add unit tests Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 Normal, 462 Normal,
463 ForShutdown, 463 ForShutdown,
464 }; 464 };
465 void DeleteResourceInternal(ResourceMap::iterator it, DeleteStyle style); 465 void DeleteResourceInternal(ResourceMap::iterator it, DeleteStyle style);
466 void DeleteAndReturnUnusedResourcesToChild(ChildMap::iterator child_it, 466 void DeleteAndReturnUnusedResourcesToChild(ChildMap::iterator child_it,
467 DeleteStyle style, 467 DeleteStyle style,
468 const ResourceIdArray& unused); 468 const ResourceIdArray& unused);
469 void DestroyChildInternal(ChildMap::iterator it, DeleteStyle style); 469 void DestroyChildInternal(ChildMap::iterator it, DeleteStyle style);
470 void LazyCreate(Resource* resource); 470 void LazyCreate(Resource* resource);
471 void LazyAllocate(Resource* resource); 471 void LazyAllocate(Resource* resource);
472 void BindImageForSampling(Resource* resource);
472 473
473 // Binds the given GL resource to a texture target for sampling using the 474 // Binds the given GL resource to a texture target for sampling using the
474 // specified filter for both minification and magnification. Returns the 475 // specified filter for both minification and magnification. Returns the
475 // texture target used. The resource must be locked for reading. 476 // texture target used. The resource must be locked for reading.
476 GLenum BindForSampling(ResourceProvider::ResourceId resource_id, 477 GLenum BindForSampling(ResourceProvider::ResourceId resource_id,
477 GLenum unit, 478 GLenum unit,
478 GLenum filter); 479 GLenum filter);
479 480
480 // Returns NULL if the output_surface_ does not have a ContextProvider. 481 // Returns NULL if the output_surface_ does not have a ContextProvider.
481 gpu::gles2::GLES2Interface* ContextGL() const; 482 gpu::gles2::GLES2Interface* ContextGL() const;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 return format_gl_data_format[format]; 552 return format_gl_data_format[format];
552 } 553 }
553 554
554 inline GLenum GLInternalFormat(ResourceFormat format) { 555 inline GLenum GLInternalFormat(ResourceFormat format) {
555 return GLDataFormat(format); 556 return GLDataFormat(format);
556 } 557 }
557 558
558 } // namespace cc 559 } // namespace cc
559 560
560 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 561 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698