| 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 2210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2283 EXPECT_CALL(overlay_scheduler, | 2285 EXPECT_CALL(overlay_scheduler, |
| 2284 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, | 2286 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, |
| 2285 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); | 2287 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); |
| 2286 | 2288 |
| 2287 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, | 2289 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, |
| 2288 viewport_rect, false); | 2290 viewport_rect, false); |
| 2289 } | 2291 } |
| 2290 | 2292 |
| 2291 } // namespace | 2293 } // namespace |
| 2292 } // namespace cc | 2294 } // namespace cc |
| OLD | NEW |