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

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

Issue 99553002: cc: Prevent ResourceUpdateContoller from uploading textures after lost context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // the resource). 131 // the resource).
132 void SetPixels(ResourceId id, 132 void SetPixels(ResourceId id,
133 const uint8_t* image, 133 const uint8_t* image,
134 gfx::Rect image_rect, 134 gfx::Rect image_rect,
135 gfx::Rect source_rect, 135 gfx::Rect source_rect,
136 gfx::Vector2d dest_offset); 136 gfx::Vector2d dest_offset);
137 137
138 // Check upload status. 138 // Check upload status.
139 size_t NumBlockingUploads(); 139 size_t NumBlockingUploads();
140 void MarkPendingUploadsAsNonBlocking(); 140 void MarkPendingUploadsAsNonBlocking();
141 double EstimatedUploadsPerSecond(); 141 size_t EstimatedUploadsPerTick();
142 void FlushUploads(); 142 void FlushUploads();
143 void ReleaseCachedData(); 143 void ReleaseCachedData();
144 base::TimeDelta TextureUpdateTickRate(); 144 base::TimeTicks EstimatedUploadCompletionTime(size_t uploads_per_tick);
145 145
146 // Flush all context operations, kicking uploads and ensuring ordering with 146 // Flush all context operations, kicking uploads and ensuring ordering with
147 // respect to other contexts. 147 // respect to other contexts.
148 void Flush(); 148 void Flush();
149 149
150 // Finish all context operations, causing any pending callbacks to be 150 // Finish all context operations, causing any pending callbacks to be
151 // scheduled. 151 // scheduled.
152 void Finish(); 152 void Finish();
153 153
154 // Only flush the command buffer if supported. 154 // Only flush the command buffer if supported.
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 return format_gl_data_format[format]; 548 return format_gl_data_format[format];
549 } 549 }
550 550
551 inline GLenum GLInternalFormat(ResourceFormat format) { 551 inline GLenum GLInternalFormat(ResourceFormat format) {
552 return GLDataFormat(format); 552 return GLDataFormat(format);
553 } 553 }
554 554
555 } // namespace cc 555 } // namespace cc
556 556
557 #endif // CC_RESOURCES_RESOURCE_PROVIDER_H_ 557 #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