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

Side by Side Diff: cc/texture_uploader.h

Issue 12284013: Shrink texture uploader when not visible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename Created 7 years, 10 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 | « cc/resource_provider.cc ('k') | cc/texture_uploader.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_TEXTURE_UPLOADER_H_ 5 #ifndef CC_TEXTURE_UPLOADER_H_
6 #define CC_TEXTURE_UPLOADER_H_ 6 #define CC_TEXTURE_UPLOADER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // image be a buffer for imageRect. This function will copy the region 46 // image be a buffer for imageRect. This function will copy the region
47 // corresponding to sourceRect to destOffset in this sub-image. 47 // corresponding to sourceRect to destOffset in this sub-image.
48 void upload(const uint8* image, 48 void upload(const uint8* image,
49 const gfx::Rect& content_rect, 49 const gfx::Rect& content_rect,
50 const gfx::Rect& source_rect, 50 const gfx::Rect& source_rect,
51 const gfx::Vector2d& dest_offset, 51 const gfx::Vector2d& dest_offset,
52 GLenum format, 52 GLenum format,
53 const gfx::Size& size); 53 const gfx::Size& size);
54 54
55 void flush(); 55 void flush();
56 void releaseCachedQueries();
56 57
57 private: 58 private:
58 class Query { 59 class Query {
59 public: 60 public:
60 static scoped_ptr<Query> create(WebKit::WebGraphicsContext3D* context) { return make_scoped_ptr(new Query(context)); } 61 static scoped_ptr<Query> create(WebKit::WebGraphicsContext3D* context) { return make_scoped_ptr(new Query(context)); }
61 62
62 virtual ~Query(); 63 virtual ~Query();
63 64
64 void begin(); 65 void begin();
65 void end(); 66 void end();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 111
111 bool m_useShallowFlush; 112 bool m_useShallowFlush;
112 size_t m_numTextureUploadsSinceLastFlush; 113 size_t m_numTextureUploadsSinceLastFlush;
113 114
114 DISALLOW_COPY_AND_ASSIGN(TextureUploader); 115 DISALLOW_COPY_AND_ASSIGN(TextureUploader);
115 }; 116 };
116 117
117 } // namespace cc 118 } // namespace cc
118 119
119 #endif // CC_TEXTURE_UPLOADER_H_ 120 #endif // CC_TEXTURE_UPLOADER_H_
OLDNEW
« no previous file with comments | « cc/resource_provider.cc ('k') | cc/texture_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698