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 #include "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 EXPECT_EQ(0, cursor_client.calls_to_set_cursor()); | 834 EXPECT_EQ(0, cursor_client.calls_to_set_cursor()); |
835 } | 835 } |
836 | 836 |
837 scoped_ptr<cc::CompositorFrame> MakeGLFrame(float scale_factor, | 837 scoped_ptr<cc::CompositorFrame> MakeGLFrame(float scale_factor, |
838 gfx::Size size, | 838 gfx::Size size, |
839 gfx::Rect damage) { | 839 gfx::Rect damage) { |
840 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); | 840 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); |
841 frame->metadata.device_scale_factor = scale_factor; | 841 frame->metadata.device_scale_factor = scale_factor; |
842 frame->gl_frame_data.reset(new cc::GLFrameData); | 842 frame->gl_frame_data.reset(new cc::GLFrameData); |
843 frame->gl_frame_data->sync_point = 1; | 843 frame->gl_frame_data->sync_point = 1; |
844 memset(frame->gl_frame_data->mailbox.name, '1', 64); | 844 memset(frame->gl_frame_data->mailbox.name, |
| 845 '1', |
| 846 sizeof(frame->gl_frame_data->mailbox.name)); |
845 frame->gl_frame_data->size = size; | 847 frame->gl_frame_data->size = size; |
846 frame->gl_frame_data->sub_buffer_rect = damage; | 848 frame->gl_frame_data->sub_buffer_rect = damage; |
847 return frame.Pass(); | 849 return frame.Pass(); |
848 } | 850 } |
849 | 851 |
850 scoped_ptr<cc::CompositorFrame> MakeSoftwareFrame(float scale_factor, | 852 scoped_ptr<cc::CompositorFrame> MakeSoftwareFrame(float scale_factor, |
851 gfx::Size size, | 853 gfx::Size size, |
852 gfx::Rect damage) { | 854 gfx::Rect damage) { |
853 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); | 855 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); |
854 frame->metadata.device_scale_factor = scale_factor; | 856 frame->metadata.device_scale_factor = scale_factor; |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1413 | 1415 |
1414 // Because the copy request callback may be holding state within it, that | 1416 // Because the copy request callback may be holding state within it, that |
1415 // state must handle the RWHVA and ImageTransportFactory going away before the | 1417 // state must handle the RWHVA and ImageTransportFactory going away before the |
1416 // callback is called. This test passes if it does not crash as a result of | 1418 // callback is called. This test passes if it does not crash as a result of |
1417 // these things being destroyed. | 1419 // these things being destroyed. |
1418 EXPECT_EQ(2, callback_count_); | 1420 EXPECT_EQ(2, callback_count_); |
1419 EXPECT_FALSE(result_); | 1421 EXPECT_FALSE(result_); |
1420 } | 1422 } |
1421 | 1423 |
1422 } // namespace content | 1424 } // namespace content |
OLD | NEW |