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

Side by Side Diff: gpu/command_buffer/service/framebuffer_manager_unittest.cc

Issue 2031263002: gpu: Allow framebuffers with mixed samples if the hw supports it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "gpu/command_buffer/service/error_state_mock.h" 8 #include "gpu/command_buffer/service/error_state_mock.h"
9 #include "gpu/command_buffer/service/feature_info.h" 9 #include "gpu/command_buffer/service/feature_info.h"
10 #include "gpu/command_buffer/service/framebuffer_manager.h" 10 #include "gpu/command_buffer/service/framebuffer_manager.h"
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 ASSERT_TRUE(attachment != NULL); 369 ASSERT_TRUE(attachment != NULL);
370 EXPECT_EQ(kWidth4, attachment->width()); 370 EXPECT_EQ(kWidth4, attachment->width());
371 EXPECT_EQ(kHeight4, attachment->height()); 371 EXPECT_EQ(kHeight4, attachment->height());
372 EXPECT_EQ(kSamples4, attachment->samples()); 372 EXPECT_EQ(kSamples4, attachment->samples());
373 EXPECT_EQ(kFormat4, attachment->internal_format()); 373 EXPECT_EQ(kFormat4, attachment->internal_format());
374 EXPECT_FALSE(attachment->cleared()); 374 EXPECT_FALSE(attachment->cleared());
375 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_COMPLETE), 375 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_COMPLETE),
376 framebuffer_->IsPossiblyComplete(feature_info_.get())); 376 framebuffer_->IsPossiblyComplete(feature_info_.get()));
377 377
378 // Change samples. 378 // Change samples.
379 ASSERT_FALSE(
380 feature_info_->feature_flags().chromium_framebuffer_mixed_samples);
379 renderbuffer_manager_->SetInfo( 381 renderbuffer_manager_->SetInfo(
380 renderbuffer4, kDifferentSamples4, kFormat4, kWidth4, kHeight4); 382 renderbuffer4, kDifferentSamples4, kFormat4, kWidth4, kHeight4);
381 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE), 383 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE),
382 framebuffer_->IsPossiblyComplete(feature_info_.get())); 384 framebuffer_->IsPossiblyComplete(feature_info_.get()));
383 renderbuffer_manager_->SetInfo( 385 renderbuffer_manager_->SetInfo(
384 renderbuffer4, kSamples4, kFormat4, kWidth4, kHeight4); 386 renderbuffer4, kSamples4, kFormat4, kWidth4, kHeight4);
385 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_COMPLETE), 387 EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_COMPLETE),
386 framebuffer_->IsPossiblyComplete(feature_info_.get())); 388 framebuffer_->IsPossiblyComplete(feature_info_.get()));
387 389
388 // Check changing an attachment. 390 // Check changing an attachment.
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 renderbuffer_manager_->GetRenderbuffer(kRenderbufferClientId); 1314 renderbuffer_manager_->GetRenderbuffer(kRenderbufferClientId);
1313 ASSERT_TRUE(renderbuffer != NULL); 1315 ASSERT_TRUE(renderbuffer != NULL);
1314 framebuffer_->AttachRenderbuffer(GL_COLOR_ATTACHMENT1, renderbuffer); 1316 framebuffer_->AttachRenderbuffer(GL_COLOR_ATTACHMENT1, renderbuffer);
1315 EXPECT_TRUE(framebuffer_->GetReadBufferAttachment()); 1317 EXPECT_TRUE(framebuffer_->GetReadBufferAttachment());
1316 } 1318 }
1317 1319
1318 } // namespace gles2 1320 } // namespace gles2
1319 } // namespace gpu 1321 } // namespace gpu
1320 1322
1321 1323
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698