summaryrefslogtreecommitdiffstats
path: root/cc/test/test_web_graphics_context_3d.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/test/test_web_graphics_context_3d.cc')
-rw-r--r--cc/test/test_web_graphics_context_3d.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/cc/test/test_web_graphics_context_3d.cc b/cc/test/test_web_graphics_context_3d.cc
index 57183d3..3157e27 100644
--- a/cc/test/test_web_graphics_context_3d.cc
+++ b/cc/test/test_web_graphics_context_3d.cc
@@ -79,6 +79,8 @@ TestWebGraphicsContext3D::TestWebGraphicsContext3D()
scale_factor_(-1.f),
test_support_(NULL),
last_update_type_(NoUpdate),
+ next_insert_sync_point_(1),
+ last_waited_sync_point_(0),
bound_buffer_(0),
peak_transfer_buffer_memory_used_bytes_(0),
weak_ptr_factory_(this) {
@@ -605,6 +607,15 @@ void TestWebGraphicsContext3D::unmapImageCHROMIUM(
DCHECK_GT(namespace_->images.count(image_id), 0u);
}
+unsigned TestWebGraphicsContext3D::insertSyncPoint() {
+ return next_insert_sync_point_++;
+}
+
+void TestWebGraphicsContext3D::waitSyncPoint(unsigned sync_point) {
+ if (sync_point)
+ last_waited_sync_point_ = sync_point;
+}
+
size_t TestWebGraphicsContext3D::NumTextures() const {
base::AutoLock lock(namespace_->lock);
return namespace_->textures.Size();