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

Unified Diff: cc/output/gl_renderer_pixeltest.cc

Issue 14126014: Add signalSyncPoint to the WebGraphicsContext3D command buffer impls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: cc/output/gl_renderer_pixeltest.cc
diff --git a/cc/output/gl_renderer_pixeltest.cc b/cc/output/gl_renderer_pixeltest.cc
index 064b78bf27a2980d47aa8ca1256a81c7ff463f41..6ffa610de38d2681a9c7e2fdef2ebb0e5ee69736 100644
--- a/cc/output/gl_renderer_pixeltest.cc
+++ b/cc/output/gl_renderer_pixeltest.cc
@@ -6,6 +6,7 @@
#include "cc/layers/append_quads_data.h"
#include "cc/quads/draw_quad.h"
+#include "cc/resources/sync_point_helper.h"
#include "cc/test/pixel_test.h"
#include "third_party/skia/include/core/SkImageFilter.h"
#include "third_party/skia/include/core/SkMatrix.h"
@@ -524,6 +525,20 @@ TEST_F(GLRendererPixelTest, AntiAliasing) {
base::FilePath(FILE_PATH_LITERAL("anti_aliasing.png")),
ExactPixelComparator(true)));
}
+
+static void SyncPointCallback(int* callback_count) {
+ ++(*callback_count);
+}
+
+TEST_F(GLRendererPixelTest, SignalSyncPoint) {
+ int callback_count = 0;
+ scoped_ptr<SyncPointHelper> helper = SyncPointHelper::SignalSyncPoint(
+ output_surface_->context3d(),
+ output_surface_->context3d()->insertSyncPoint(),
+ base::Bind(&SyncPointCallback, &callback_count));
+ output_surface_->context3d()->finish();
+ EXPECT_EQ(1, callback_count);
+}
#endif
} // namespace
« no previous file with comments | « cc/cc.gyp ('k') | cc/resources/sync_point_helper.h » ('j') | cc/resources/sync_point_helper.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698