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

Unified Diff: core/cross/texture_base.h

Issue 5591006: Add an API to allow JavaScript to determine the framerate of individual dynam... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/cross/gles2/texture_gles2.cc ('k') | core/cross/texture_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/cross/texture_base.h
===================================================================
--- core/cross/texture_base.h (revision 66674)
+++ core/cross/texture_base.h (working copy)
@@ -117,6 +117,15 @@
return format_;
}
+ int update_count() {
+ return update_count_;
+ }
+
+ int render_count() {
+ CheckLastTextureUpdateRendered();
+ return render_count_;
+ }
+
bool render_surfaces_enabled() const {
return render_surfaces_enabled_;
}
@@ -142,7 +151,13 @@
format_ = format;
}
+ void TextureUpdated();
+
+ Renderer* renderer_;
+
private:
+ void CheckLastTextureUpdateRendered();
+
// The number of mipmap levels contained in this texture.
ParamInteger::Ref levels_param_;
@@ -157,6 +172,13 @@
bool render_surfaces_enabled_;
+ // Counting of frames, to allow the page to determine the framerate of dynamic
+ // textures.
+ bool has_unrendered_update_;
+ int last_render_frame_count_;
+ int update_count_;
+ int render_count_;
+
O3D_DECL_CLASS(Texture, ParamObject);
DISALLOW_COPY_AND_ASSIGN(Texture);
};
« no previous file with comments | « core/cross/gles2/texture_gles2.cc ('k') | core/cross/texture_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698