| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 last_copy_request_->texture_mailbox().sync_token()); | 403 last_copy_request_->texture_mailbox().sync_token()); |
| 404 gl_helper->ResizeTexture(texture, window()->bounds().size()); | 404 gl_helper->ResizeTexture(texture, window()->bounds().size()); |
| 405 gl_helper->DeleteTexture(texture); | 405 gl_helper->DeleteTexture(texture); |
| 406 } | 406 } |
| 407 } | 407 } |
| 408 | 408 |
| 409 cc::SurfaceId surface_id() const { | 409 cc::SurfaceId surface_id() const { |
| 410 return GetDelegatedFrameHost()->SurfaceIdForTesting(); | 410 return GetDelegatedFrameHost()->SurfaceIdForTesting(); |
| 411 } | 411 } |
| 412 | 412 |
| 413 const cc::LocalFrameId& GetLocalFrameId() const { | 413 const cc::LocalSurfaceId& GetLocalSurfaceId() const { |
| 414 return GetDelegatedFrameHost()->LocalFrameIdForTesting(); | 414 return GetDelegatedFrameHost()->LocalSurfaceIdForTesting(); |
| 415 } | 415 } |
| 416 | 416 |
| 417 bool HasFrameData() const { return GetLocalFrameId().is_valid(); } | 417 bool HasFrameData() const { return GetLocalSurfaceId().is_valid(); } |
| 418 | 418 |
| 419 bool released_front_lock_active() const { | 419 bool released_front_lock_active() const { |
| 420 return GetDelegatedFrameHost()->ReleasedFrontLockActiveForTesting(); | 420 return GetDelegatedFrameHost()->ReleasedFrontLockActiveForTesting(); |
| 421 } | 421 } |
| 422 | 422 |
| 423 void ReturnResources(const cc::ReturnedResourceArray& resources) { | 423 void ReturnResources(const cc::ReturnedResourceArray& resources) { |
| 424 GetDelegatedFrameHost()->ReturnResources(resources); | 424 GetDelegatedFrameHost()->ReturnResources(resources); |
| 425 } | 425 } |
| 426 | 426 |
| 427 void ResetCompositor() { GetDelegatedFrameHost()->ResetCompositor(); } | 427 void ResetCompositor() { GetDelegatedFrameHost()->ResetCompositor(); } |
| (...skipping 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2706 view_->GetDelegatedFrameHost()->tick_clock_ = base::WrapUnique(tick_clock_); | 2706 view_->GetDelegatedFrameHost()->tick_clock_ = base::WrapUnique(tick_clock_); |
| 2707 } | 2707 } |
| 2708 | 2708 |
| 2709 void OnSwapCompositorFrame() { | 2709 void OnSwapCompositorFrame() { |
| 2710 view_->OnSwapCompositorFrame( | 2710 view_->OnSwapCompositorFrame( |
| 2711 1, MakeDelegatedFrame(1.f, view_rect_.size(), view_rect_)); | 2711 1, MakeDelegatedFrame(1.f, view_rect_.size(), view_rect_)); |
| 2712 cc::SurfaceId surface_id = | 2712 cc::SurfaceId surface_id = |
| 2713 view_->GetDelegatedFrameHost()->SurfaceIdForTesting(); | 2713 view_->GetDelegatedFrameHost()->SurfaceIdForTesting(); |
| 2714 if (surface_id.is_valid()) | 2714 if (surface_id.is_valid()) |
| 2715 view_->GetDelegatedFrameHost()->WillDrawSurface( | 2715 view_->GetDelegatedFrameHost()->WillDrawSurface( |
| 2716 surface_id.local_frame_id(), view_rect_); | 2716 surface_id.local_surface_id(), view_rect_); |
| 2717 ASSERT_TRUE(view_->last_copy_request_); | 2717 ASSERT_TRUE(view_->last_copy_request_); |
| 2718 } | 2718 } |
| 2719 | 2719 |
| 2720 void ReleaseSwappedFrame() { | 2720 void ReleaseSwappedFrame() { |
| 2721 std::unique_ptr<cc::CopyOutputRequest> request = | 2721 std::unique_ptr<cc::CopyOutputRequest> request = |
| 2722 std::move(view_->last_copy_request_); | 2722 std::move(view_->last_copy_request_); |
| 2723 request->SendTextureResult(view_rect_.size(), request->texture_mailbox(), | 2723 request->SendTextureResult(view_rect_.size(), request->texture_mailbox(), |
| 2724 std::unique_ptr<cc::SingleReleaseCallback>()); | 2724 std::unique_ptr<cc::SingleReleaseCallback>()); |
| 2725 RunLoopUntilCallback(); | 2725 RunLoopUntilCallback(); |
| 2726 } | 2726 } |
| (...skipping 2032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4759 // There is no composition in the beginning. | 4759 // There is no composition in the beginning. |
| 4760 EXPECT_FALSE(has_composition_text()); | 4760 EXPECT_FALSE(has_composition_text()); |
| 4761 SetHasCompositionTextToTrue(); | 4761 SetHasCompositionTextToTrue(); |
| 4762 view->ImeCancelComposition(); | 4762 view->ImeCancelComposition(); |
| 4763 // The composition must have been canceled. | 4763 // The composition must have been canceled. |
| 4764 EXPECT_FALSE(has_composition_text()); | 4764 EXPECT_FALSE(has_composition_text()); |
| 4765 } | 4765 } |
| 4766 } | 4766 } |
| 4767 | 4767 |
| 4768 } // namespace content | 4768 } // namespace content |
| OLD | NEW |