OLD | NEW |
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 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
7 | 7 |
8 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
10 #include "gpu/command_buffer/service/buffer_manager.h" | 10 #include "gpu/command_buffer/service/buffer_manager.h" |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 GLuint restore_stencil, | 340 GLuint restore_stencil, |
341 GLclampf restore_depth, | 341 GLclampf restore_depth, |
342 bool restore_scissor_test); | 342 bool restore_scissor_test); |
343 | 343 |
344 void SetupExpectationsForDepthMask(bool mask); | 344 void SetupExpectationsForDepthMask(bool mask); |
345 void SetupExpectationsForEnableDisable(GLenum cap, bool enable); | 345 void SetupExpectationsForEnableDisable(GLenum cap, bool enable); |
346 void SetupExpectationsForColorMask(bool red, | 346 void SetupExpectationsForColorMask(bool red, |
347 bool green, | 347 bool green, |
348 bool blue, | 348 bool blue, |
349 bool alpha); | 349 bool alpha); |
350 void SetupExpectationsForStencilMask(uint32 front_mask, | 350 void SetupExpectationsForStencilMask(GLuint front_mask, GLuint back_mask); |
351 uint32 back_mask); | |
352 | 351 |
353 void SetupExpectationsForApplyingDirtyState( | 352 void SetupExpectationsForApplyingDirtyState( |
354 bool framebuffer_is_rgb, | 353 bool framebuffer_is_rgb, |
355 bool framebuffer_has_depth, | 354 bool framebuffer_has_depth, |
356 bool framebuffer_has_stencil, | 355 bool framebuffer_has_stencil, |
357 GLuint color_bits, // NOTE! bits are 0x1000, 0x0100, 0x0010, and 0x0001 | 356 GLuint color_bits, // NOTE! bits are 0x1000, 0x0100, 0x0010, and 0x0001 |
358 bool depth_mask, | 357 bool depth_mask, |
359 bool depth_enabled, | 358 bool depth_enabled, |
360 GLuint front_stencil_mask, | 359 GLuint front_stencil_mask, |
361 GLuint back_stencil_mask, | 360 GLuint back_stencil_mask, |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 bool service_renderbuffer_valid_; | 528 bool service_renderbuffer_valid_; |
530 | 529 |
531 uint32 immediate_buffer_[64]; | 530 uint32 immediate_buffer_[64]; |
532 | 531 |
533 const bool ignore_cached_state_for_test_; | 532 const bool ignore_cached_state_for_test_; |
534 bool cached_color_mask_red_; | 533 bool cached_color_mask_red_; |
535 bool cached_color_mask_green_; | 534 bool cached_color_mask_green_; |
536 bool cached_color_mask_blue_; | 535 bool cached_color_mask_blue_; |
537 bool cached_color_mask_alpha_; | 536 bool cached_color_mask_alpha_; |
538 bool cached_depth_mask_; | 537 bool cached_depth_mask_; |
539 uint32 cached_stencil_front_mask_; | 538 GLuint cached_stencil_front_mask_; |
540 uint32 cached_stencil_back_mask_; | 539 GLuint cached_stencil_back_mask_; |
541 | 540 |
542 struct EnableFlags { | 541 struct EnableFlags { |
543 EnableFlags(); | 542 EnableFlags(); |
544 bool cached_blend; | 543 bool cached_blend; |
545 bool cached_cull_face; | 544 bool cached_cull_face; |
546 bool cached_depth_test; | 545 bool cached_depth_test; |
547 bool cached_dither; | 546 bool cached_dither; |
548 bool cached_polygon_offset_fill; | 547 bool cached_polygon_offset_fill; |
549 bool cached_sample_alpha_to_coverage; | 548 bool cached_sample_alpha_to_coverage; |
550 bool cached_sample_coverage; | 549 bool cached_sample_coverage; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 }; | 638 }; |
640 | 639 |
641 // SpecializedSetup specializations that are needed in multiple unittest files. | 640 // SpecializedSetup specializations that are needed in multiple unittest files. |
642 template <> | 641 template <> |
643 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); | 642 void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid); |
644 | 643 |
645 } // namespace gles2 | 644 } // namespace gles2 |
646 } // namespace gpu | 645 } // namespace gpu |
647 | 646 |
648 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 647 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
OLD | NEW |