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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp

Issue 1548993002: Switch to standard integer types in base/strings/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 // to be complete. 602 // to be complete.
603 TEST(DrawingBufferDepthStencilTest, packedDepthStencilSupported) 603 TEST(DrawingBufferDepthStencilTest, packedDepthStencilSupported)
604 { 604 {
605 DepthStencilTestCase cases[] = { 605 DepthStencilTestCase cases[] = {
606 DepthStencilTestCase(false, false, false, 0, "neither"), 606 DepthStencilTestCase(false, false, false, 0, "neither"),
607 DepthStencilTestCase(true, false, true, 1, "stencil only"), 607 DepthStencilTestCase(true, false, true, 1, "stencil only"),
608 DepthStencilTestCase(false, true, true, 1, "depth only"), 608 DepthStencilTestCase(false, true, true, 1, "depth only"),
609 DepthStencilTestCase(true, true, true, 1, "both"), 609 DepthStencilTestCase(true, true, true, 1, "both"),
610 }; 610 };
611 611
612 for (size_t i = 0; i < arraysize(cases); i++) { 612 for (size_t i = 0; i < WTF_ARRAY_LENGTH(cases); i++) {
613 SCOPED_TRACE(cases[i].testCaseName); 613 SCOPED_TRACE(cases[i].testCaseName);
614 OwnPtr<DepthStencilTrackingContext> context = adoptPtr(new DepthStencilT rackingContext); 614 OwnPtr<DepthStencilTrackingContext> context = adoptPtr(new DepthStencilT rackingContext);
615 DepthStencilTrackingContext* trackingContext = context.get(); 615 DepthStencilTrackingContext* trackingContext = context.get();
616 DrawingBuffer::PreserveDrawingBuffer preserve = DrawingBuffer::Preserve; 616 DrawingBuffer::PreserveDrawingBuffer preserve = DrawingBuffer::Preserve;
617 617
618 WebGraphicsContext3D::Attributes requestedAttributes; 618 WebGraphicsContext3D::Attributes requestedAttributes;
619 requestedAttributes.stencil = cases[i].requestStencil; 619 requestedAttributes.stencil = cases[i].requestStencil;
620 requestedAttributes.depth = cases[i].requestDepth; 620 requestedAttributes.depth = cases[i].requestDepth;
621 RefPtr<DrawingBuffer> drawingBuffer = DrawingBuffer::create(context.rele ase(), IntSize(10, 10), preserve, requestedAttributes); 621 RefPtr<DrawingBuffer> drawingBuffer = DrawingBuffer::create(context.rele ase(), IntSize(10, 10), preserve, requestedAttributes);
622 622
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 // m_drawingBuffer deletes mailbox immediately when hidden. 663 // m_drawingBuffer deletes mailbox immediately when hidden.
664 664
665 WGC3Duint waitSyncToken = 0; 665 WGC3Duint waitSyncToken = 0;
666 memcpy(&waitSyncToken, mailbox.syncToken, sizeof(waitSyncToken)); 666 memcpy(&waitSyncToken, mailbox.syncToken, sizeof(waitSyncToken));
667 EXPECT_EQ(waitSyncToken, webContext()->mostRecentlyWaitedSyncToken()); 667 EXPECT_EQ(waitSyncToken, webContext()->mostRecentlyWaitedSyncToken());
668 668
669 m_drawingBuffer->beginDestruction(); 669 m_drawingBuffer->beginDestruction();
670 } 670 }
671 671
672 } // namespace blink 672 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698