| 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/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 window()->GetHost()->compositor()); | 272 window()->GetHost()->compositor()); |
| 273 } | 273 } |
| 274 | 274 |
| 275 void InterceptCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request) { | 275 void InterceptCopyOfOutput(scoped_ptr<cc::CopyOutputRequest> request) { |
| 276 last_copy_request_ = request.Pass(); | 276 last_copy_request_ = request.Pass(); |
| 277 if (last_copy_request_->has_texture_mailbox()) { | 277 if (last_copy_request_->has_texture_mailbox()) { |
| 278 // Give the resulting texture a size. | 278 // Give the resulting texture a size. |
| 279 GLHelper* gl_helper = ImageTransportFactory::GetInstance()->GetGLHelper(); | 279 GLHelper* gl_helper = ImageTransportFactory::GetInstance()->GetGLHelper(); |
| 280 GLuint texture = gl_helper->ConsumeMailboxToTexture( | 280 GLuint texture = gl_helper->ConsumeMailboxToTexture( |
| 281 last_copy_request_->texture_mailbox().mailbox(), | 281 last_copy_request_->texture_mailbox().mailbox(), |
| 282 last_copy_request_->texture_mailbox().sync_point()); | 282 last_copy_request_->texture_mailbox().sync_token()); |
| 283 gl_helper->ResizeTexture(texture, window()->bounds().size()); | 283 gl_helper->ResizeTexture(texture, window()->bounds().size()); |
| 284 gl_helper->DeleteTexture(texture); | 284 gl_helper->DeleteTexture(texture); |
| 285 } | 285 } |
| 286 } | 286 } |
| 287 | 287 |
| 288 cc::DelegatedFrameProvider* frame_provider() const { | 288 cc::DelegatedFrameProvider* frame_provider() const { |
| 289 return GetDelegatedFrameHost()->FrameProviderForTesting(); | 289 return GetDelegatedFrameHost()->FrameProviderForTesting(); |
| 290 } | 290 } |
| 291 | 291 |
| 292 cc::SurfaceId surface_id() const { | 292 cc::SurfaceId surface_id() const { |
| (...skipping 3310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3603 ViewMsg_SetSurfaceIdNamespace::Read(msg, ¶ms); | 3603 ViewMsg_SetSurfaceIdNamespace::Read(msg, ¶ms); |
| 3604 view_->InitAsChild(NULL); | 3604 view_->InitAsChild(NULL); |
| 3605 view_->Show(); | 3605 view_->Show(); |
| 3606 view_->SetSize(size); | 3606 view_->SetSize(size); |
| 3607 view_->OnSwapCompositorFrame(0, | 3607 view_->OnSwapCompositorFrame(0, |
| 3608 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); | 3608 MakeDelegatedFrame(1.f, size, gfx::Rect(size))); |
| 3609 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); | 3609 EXPECT_EQ(view_->GetSurfaceIdNamespace(), base::get<0>(params)); |
| 3610 } | 3610 } |
| 3611 | 3611 |
| 3612 } // namespace content | 3612 } // namespace content |
| OLD | NEW |