| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "cc/quads/debug_border_draw_quad.h" | 10 #include "cc/quads/debug_border_draw_quad.h" |
| 11 #include "cc/quads/render_pass.h" | 11 #include "cc/quads/render_pass.h" |
| 12 #include "cc/quads/solid_color_draw_quad.h" | 12 #include "cc/quads/solid_color_draw_quad.h" |
| 13 #include "cc/quads/surface_draw_quad.h" | 13 #include "cc/quads/surface_draw_quad.h" |
| 14 #include "cc/quads/texture_draw_quad.h" | 14 #include "cc/quads/texture_draw_quad.h" |
| 15 #include "cc/resources/resource_provider.h" | 15 #include "cc/resources/resource_provider.h" |
| 16 #include "components/mus/public/cpp/surfaces/surfaces_type_converters.h" | 16 #include "components/mus/public/cpp/surfaces/surfaces_type_converters.h" |
| 17 #include "gpu/command_buffer/common/mailbox.h" | 17 #include "gpu/command_buffer/common/mailbox.h" |
| 18 #include "gpu/command_buffer/common/mailbox_holder.h" | 18 #include "gpu/command_buffer/common/mailbox_holder.h" |
| 19 #include "gpu/command_buffer/common/sync_token.h" | 19 #include "gpu/command_buffer/common/sync_token.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 #include "third_party/skia/include/core/SkColor.h" | 21 #include "third_party/skia/include/core/SkColor.h" |
| 22 #include "third_party/skia/include/core/SkXfermode.h" | 22 #include "third_party/skia/include/core/SkXfermode.h" |
| 23 | 23 |
| 24 using cc::mojom::CompositorFrame; |
| 25 using cc::mojom::CompositorFramePtr; |
| 24 using cc::mojom::DebugBorderQuadState; | 26 using cc::mojom::DebugBorderQuadState; |
| 25 using cc::mojom::DebugBorderQuadStatePtr; | 27 using cc::mojom::DebugBorderQuadStatePtr; |
| 26 using cc::mojom::DrawQuad; | 28 using cc::mojom::DrawQuad; |
| 27 using cc::mojom::DrawQuadPtr; | 29 using cc::mojom::DrawQuadPtr; |
| 28 using cc::mojom::RenderPass; | 30 using cc::mojom::RenderPass; |
| 29 using cc::mojom::RenderPassPtr; | 31 using cc::mojom::RenderPassPtr; |
| 30 using cc::mojom::RenderPassQuadState; | 32 using cc::mojom::RenderPassQuadState; |
| 31 using cc::mojom::RenderPassQuadStatePtr; | 33 using cc::mojom::RenderPassQuadStatePtr; |
| 32 using cc::mojom::SolidColorQuadState; | 34 using cc::mojom::SolidColorQuadState; |
| 33 using cc::mojom::SolidColorQuadStatePtr; | 35 using cc::mojom::SolidColorQuadStatePtr; |
| 34 using cc::mojom::SurfaceQuadState; | 36 using cc::mojom::SurfaceQuadState; |
| 35 using cc::mojom::SurfaceQuadStatePtr; | 37 using cc::mojom::SurfaceQuadStatePtr; |
| 36 using cc::mojom::TextureQuadState; | 38 using cc::mojom::TextureQuadState; |
| 37 using cc::mojom::TextureQuadStatePtr; | 39 using cc::mojom::TextureQuadStatePtr; |
| 38 using cc::mojom::TileQuadState; | 40 using cc::mojom::TileQuadState; |
| 39 using cc::mojom::TileQuadStatePtr; | 41 using cc::mojom::TileQuadStatePtr; |
| 40 using cc::mojom::YUVColorSpace; | 42 using cc::mojom::YUVColorSpace; |
| 41 using cc::mojom::YUVVideoQuadState; | 43 using cc::mojom::YUVVideoQuadState; |
| 42 using cc::mojom::YUVVideoQuadStatePtr; | 44 using cc::mojom::YUVVideoQuadStatePtr; |
| 43 using mus::mojom::CompositorFrame; | |
| 44 using mus::mojom::CompositorFramePtr; | |
| 45 | 45 |
| 46 namespace mojo { | 46 namespace mojo { |
| 47 namespace { | 47 namespace { |
| 48 | 48 |
| 49 | 49 |
| 50 class SurfaceLibQuadTest : public testing::Test { | 50 class SurfaceLibQuadTest : public testing::Test { |
| 51 public: | 51 public: |
| 52 SurfaceLibQuadTest() | 52 SurfaceLibQuadTest() |
| 53 : rect(5, 7, 13, 19), | 53 : rect(5, 7, 13, 19), |
| 54 opaque_rect(rect), | 54 opaque_rect(rect), |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 EXPECT_EQ(needs_blending, mus_quad->needs_blending); | 323 EXPECT_EQ(needs_blending, mus_quad->needs_blending); |
| 324 ASSERT_TRUE(mus_quad->debug_border_quad_state); | 324 ASSERT_TRUE(mus_quad->debug_border_quad_state); |
| 325 DebugBorderQuadStatePtr& mus_debug_border_state = | 325 DebugBorderQuadStatePtr& mus_debug_border_state = |
| 326 mus_quad->debug_border_quad_state; | 326 mus_quad->debug_border_quad_state; |
| 327 EXPECT_EQ(arbitrary_color, mus_debug_border_state->color); | 327 EXPECT_EQ(arbitrary_color, mus_debug_border_state->color); |
| 328 EXPECT_EQ(width, mus_debug_border_state->width); | 328 EXPECT_EQ(width, mus_debug_border_state->width); |
| 329 } | 329 } |
| 330 | 330 |
| 331 } // namespace | 331 } // namespace |
| 332 } // namespace mojo | 332 } // namespace mojo |
| OLD | NEW |