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, | 844 memset(frame->gl_frame_data->mailbox.name, '1', 64); |
845 '1', | |
846 sizeof(frame->gl_frame_data->mailbox.name)); | |
847 frame->gl_frame_data->size = size; | 845 frame->gl_frame_data->size = size; |
848 frame->gl_frame_data->sub_buffer_rect = damage; | 846 frame->gl_frame_data->sub_buffer_rect = damage; |
849 return frame.Pass(); | 847 return frame.Pass(); |
850 } | 848 } |
851 | 849 |
852 scoped_ptr<cc::CompositorFrame> MakeSoftwareFrame(float scale_factor, | 850 scoped_ptr<cc::CompositorFrame> MakeSoftwareFrame(float scale_factor, |
853 gfx::Size size, | 851 gfx::Size size, |
854 gfx::Rect damage) { | 852 gfx::Rect damage) { |
855 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); | 853 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); |
856 frame->metadata.device_scale_factor = scale_factor; | 854 frame->metadata.device_scale_factor = scale_factor; |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1415 | 1413 |
1416 // Because the copy request callback may be holding state within it, that | 1414 // Because the copy request callback may be holding state within it, that |
1417 // state must handle the RWHVA and ImageTransportFactory going away before the | 1415 // state must handle the RWHVA and ImageTransportFactory going away before the |
1418 // callback is called. This test passes if it does not crash as a result of | 1416 // callback is called. This test passes if it does not crash as a result of |
1419 // these things being destroyed. | 1417 // these things being destroyed. |
1420 EXPECT_EQ(2, callback_count_); | 1418 EXPECT_EQ(2, callback_count_); |
1421 EXPECT_FALSE(result_); | 1419 EXPECT_FALSE(result_); |
1422 } | 1420 } |
1423 | 1421 |
1424 } // namespace content | 1422 } // namespace content |
OLD | NEW |