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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
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 #include "cc/output/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include "cc/layers/append_quads_data.h" 7 #include "cc/layers/append_quads_data.h"
8 #include "cc/quads/draw_quad.h" 8 #include "cc/quads/draw_quad.h"
9 #include "cc/resources/sync_point_helper.h"
9 #include "cc/test/pixel_test.h" 10 #include "cc/test/pixel_test.h"
10 #include "third_party/skia/include/core/SkImageFilter.h" 11 #include "third_party/skia/include/core/SkImageFilter.h"
11 #include "third_party/skia/include/core/SkMatrix.h" 12 #include "third_party/skia/include/core/SkMatrix.h"
12 #include "third_party/skia/include/effects/SkColorFilterImageFilter.h" 13 #include "third_party/skia/include/effects/SkColorFilterImageFilter.h"
13 #include "third_party/skia/include/effects/SkColorMatrixFilter.h" 14 #include "third_party/skia/include/effects/SkColorMatrixFilter.h"
14 15
15 namespace cc { 16 namespace cc {
16 namespace { 17 namespace {
17 18
18 class GLRendererPixelTest : public PixelTest {}; 19 class GLRendererPixelTest : public PixelTest {};
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 518
518 RenderPassList pass_list; 519 RenderPassList pass_list;
519 pass_list.push_back(pass.Pass()); 520 pass_list.push_back(pass.Pass());
520 521
521 renderer_->DrawFrame(&pass_list); 522 renderer_->DrawFrame(&pass_list);
522 523
523 EXPECT_TRUE(PixelsMatchReference( 524 EXPECT_TRUE(PixelsMatchReference(
524 base::FilePath(FILE_PATH_LITERAL("anti_aliasing.png")), 525 base::FilePath(FILE_PATH_LITERAL("anti_aliasing.png")),
525 ExactPixelComparator(true))); 526 ExactPixelComparator(true)));
526 } 527 }
528
529 static void SyncPointCallback(int* callback_count) {
530 ++(*callback_count);
531 }
532
533 TEST_F(GLRendererPixelTest, SignalSyncPoint) {
534 int callback_count = 0;
535 scoped_ptr<SyncPointHelper> helper = SyncPointHelper::SignalSyncPoint(
536 output_surface_->context3d(),
537 output_surface_->context3d()->insertSyncPoint(),
538 base::Bind(&SyncPointCallback, &callback_count));
539 output_surface_->context3d()->finish();
540 EXPECT_EQ(1, callback_count);
541 }
527 #endif 542 #endif
528 543
529 } // namespace 544 } // namespace
530 } // namespace cc 545 } // namespace cc
OLDNEW
« 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