| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/output/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 namespace cc { | 52 namespace cc { |
| 53 | 53 |
| 54 MATCHER_P(MatchesSyncToken, sync_token, "") { | 54 MATCHER_P(MatchesSyncToken, sync_token, "") { |
| 55 gpu::SyncToken other; | 55 gpu::SyncToken other; |
| 56 memcpy(&other, arg, sizeof(other)); | 56 memcpy(&other, arg, sizeof(other)); |
| 57 return other == sync_token; | 57 return other == sync_token; |
| 58 } | 58 } |
| 59 | 59 |
| 60 class GLRendererTest : public testing::Test { | 60 class GLRendererTest : public testing::Test { |
| 61 protected: | 61 protected: |
| 62 RenderPass* root_render_pass() { return render_passes_in_draw_order_.back(); } | 62 RenderPass* root_render_pass() { |
| 63 return render_passes_in_draw_order_.back().get(); |
| 64 } |
| 63 | 65 |
| 64 RenderPassList render_passes_in_draw_order_; | 66 RenderPassList render_passes_in_draw_order_; |
| 65 }; | 67 }; |
| 66 | 68 |
| 67 #define EXPECT_PROGRAM_VALID(program_binding) \ | 69 #define EXPECT_PROGRAM_VALID(program_binding) \ |
| 68 do { \ | 70 do { \ |
| 69 EXPECT_TRUE((program_binding)->program()); \ | 71 EXPECT_TRUE((program_binding)->program()); \ |
| 70 EXPECT_TRUE((program_binding)->initialized()); \ | 72 EXPECT_TRUE((program_binding)->initialized()); \ |
| 71 } while (false) | 73 } while (false) |
| 72 | 74 |
| (...skipping 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2231 EXPECT_CALL(overlay_scheduler, | 2233 EXPECT_CALL(overlay_scheduler, |
| 2232 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, | 2234 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, |
| 2233 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); | 2235 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); |
| 2234 | 2236 |
| 2235 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, | 2237 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, |
| 2236 viewport_rect, false); | 2238 viewport_rect, false); |
| 2237 } | 2239 } |
| 2238 | 2240 |
| 2239 } // namespace | 2241 } // namespace |
| 2240 } // namespace cc | 2242 } // namespace cc |
| OLD | NEW |