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

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

Issue 2365653005: Fix failing transferToImageBitmap layout tests and commit pixel test on Mac (Closed)
Patch Set: rebase Created 4 years, 2 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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 bool wantAntialiasing = false; 505 bool wantAntialiasing = false;
506 RefPtr<DrawingBuffer> drawingBuffer = DrawingBuffer::create( 506 RefPtr<DrawingBuffer> drawingBuffer = DrawingBuffer::create(
507 std::move(provider), 507 std::move(provider),
508 IntSize(10, 10), 508 IntSize(10, 10),
509 premultipliedAlpha, 509 premultipliedAlpha,
510 wantAlphaChannel, 510 wantAlphaChannel,
511 wantDepthBuffer, 511 wantDepthBuffer,
512 wantStencilBuffer, 512 wantStencilBuffer,
513 wantAntialiasing, 513 wantAntialiasing,
514 preserve, 514 preserve,
515 DrawingBuffer::WebGL1); 515 DrawingBuffer::WebGL1,
516 DrawingBuffer::AllowChromiumImage);
516 517
517 // When we request a depth or a stencil buffer, we will get both. 518 // When we request a depth or a stencil buffer, we will get both.
518 EXPECT_EQ(cases[i].requestDepth || cases[i].requestStencil, drawingBuffe r->hasDepthBuffer()); 519 EXPECT_EQ(cases[i].requestDepth || cases[i].requestStencil, drawingBuffe r->hasDepthBuffer());
519 EXPECT_EQ(cases[i].requestDepth || cases[i].requestStencil, drawingBuffe r->hasStencilBuffer()); 520 EXPECT_EQ(cases[i].requestDepth || cases[i].requestStencil, drawingBuffe r->hasStencilBuffer());
520 EXPECT_EQ(cases[i].expectedRenderBuffers, trackingGL->numAllocatedRender Buffer()); 521 EXPECT_EQ(cases[i].expectedRenderBuffers, trackingGL->numAllocatedRender Buffer());
521 if (cases[i].requestDepth || cases[i].requestStencil) { 522 if (cases[i].requestDepth || cases[i].requestStencil) {
522 EXPECT_NE(0u, trackingGL->depthStencilAttachment()); 523 EXPECT_NE(0u, trackingGL->depthStencilAttachment());
523 EXPECT_EQ(0u, trackingGL->depthAttachment()); 524 EXPECT_EQ(0u, trackingGL->depthAttachment());
524 EXPECT_EQ(0u, trackingGL->stencilAttachment()); 525 EXPECT_EQ(0u, trackingGL->stencilAttachment());
525 } else { 526 } else {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 m_drawingBuffer->setIsHidden(true); 561 m_drawingBuffer->setIsHidden(true);
561 releaseCallback->Run(waitSyncToken, false /* lostResource */); 562 releaseCallback->Run(waitSyncToken, false /* lostResource */);
562 // m_drawingBuffer deletes mailbox immediately when hidden. 563 // m_drawingBuffer deletes mailbox immediately when hidden.
563 564
564 EXPECT_EQ(waitSyncToken, m_gl->mostRecentlyWaitedSyncToken()); 565 EXPECT_EQ(waitSyncToken, m_gl->mostRecentlyWaitedSyncToken());
565 566
566 m_drawingBuffer->beginDestruction(); 567 m_drawingBuffer->beginDestruction();
567 } 568 }
568 569
569 } // namespace blink 570 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698