Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 2388753003: Introduce cc::LocalFrameId and use in SurfaceFactory (Closed)
Patch Set: Fix exo_unittests Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 last_copy_request_->texture_mailbox().sync_token()); 359 last_copy_request_->texture_mailbox().sync_token());
360 gl_helper->ResizeTexture(texture, window()->bounds().size()); 360 gl_helper->ResizeTexture(texture, window()->bounds().size());
361 gl_helper->DeleteTexture(texture); 361 gl_helper->DeleteTexture(texture);
362 } 362 }
363 } 363 }
364 364
365 cc::SurfaceId surface_id() const { 365 cc::SurfaceId surface_id() const {
366 return GetDelegatedFrameHost()->SurfaceIdForTesting(); 366 return GetDelegatedFrameHost()->SurfaceIdForTesting();
367 } 367 }
368 368
369 bool HasFrameData() const { 369 const cc::LocalFrameId& GetLocalFrameId() const {
370 return !surface_id().is_null(); 370 return GetDelegatedFrameHost()->LocalFrameIdForTesting();
371 } 371 }
372 372
373 bool HasFrameData() const { return !GetLocalFrameId().is_null(); }
374
373 bool released_front_lock_active() const { 375 bool released_front_lock_active() const {
374 return GetDelegatedFrameHost()->ReleasedFrontLockActiveForTesting(); 376 return GetDelegatedFrameHost()->ReleasedFrontLockActiveForTesting();
375 } 377 }
376 378
377 void ReturnResources(const cc::ReturnedResourceArray& resources) { 379 void ReturnResources(const cc::ReturnedResourceArray& resources) {
378 GetDelegatedFrameHost()->ReturnResources(resources); 380 GetDelegatedFrameHost()->ReturnResources(resources);
379 } 381 }
380 382
381 void ResetCompositor() { GetDelegatedFrameHost()->ResetCompositor(); } 383 void ResetCompositor() { GetDelegatedFrameHost()->ResetCompositor(); }
382 384
(...skipping 2235 matching lines...) Expand 10 before | Expand all | Expand 10 after
2618 tick_clock_ = new base::SimpleTestTickClock(); 2620 tick_clock_ = new base::SimpleTestTickClock();
2619 view_->GetDelegatedFrameHost()->tick_clock_ = base::WrapUnique(tick_clock_); 2621 view_->GetDelegatedFrameHost()->tick_clock_ = base::WrapUnique(tick_clock_);
2620 } 2622 }
2621 2623
2622 void OnSwapCompositorFrame() { 2624 void OnSwapCompositorFrame() {
2623 view_->OnSwapCompositorFrame( 2625 view_->OnSwapCompositorFrame(
2624 1, MakeDelegatedFrame(1.f, view_rect_.size(), view_rect_)); 2626 1, MakeDelegatedFrame(1.f, view_rect_.size(), view_rect_));
2625 cc::SurfaceId surface_id = 2627 cc::SurfaceId surface_id =
2626 view_->GetDelegatedFrameHost()->SurfaceIdForTesting(); 2628 view_->GetDelegatedFrameHost()->SurfaceIdForTesting();
2627 if (!surface_id.is_null()) 2629 if (!surface_id.is_null())
2628 view_->GetDelegatedFrameHost()->WillDrawSurface(surface_id, view_rect_); 2630 view_->GetDelegatedFrameHost()->WillDrawSurface(
2631 surface_id.local_frame_id(), view_rect_);
2629 ASSERT_TRUE(view_->last_copy_request_); 2632 ASSERT_TRUE(view_->last_copy_request_);
2630 } 2633 }
2631 2634
2632 void ReleaseSwappedFrame() { 2635 void ReleaseSwappedFrame() {
2633 std::unique_ptr<cc::CopyOutputRequest> request = 2636 std::unique_ptr<cc::CopyOutputRequest> request =
2634 std::move(view_->last_copy_request_); 2637 std::move(view_->last_copy_request_);
2635 request->SendTextureResult(view_rect_.size(), request->texture_mailbox(), 2638 request->SendTextureResult(view_rect_.size(), request->texture_mailbox(),
2636 std::unique_ptr<cc::SingleReleaseCallback>()); 2639 std::unique_ptr<cc::SingleReleaseCallback>());
2637 RunLoopUntilCallback(); 2640 RunLoopUntilCallback();
2638 } 2641 }
(...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after
4675 4678
4676 // Retrieve the selected text from clipboard and verify it is as expected. 4679 // Retrieve the selected text from clipboard and verify it is as expected.
4677 base::string16 result_text; 4680 base::string16 result_text;
4678 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text); 4681 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text);
4679 EXPECT_EQ(expected_text, result_text); 4682 EXPECT_EQ(expected_text, result_text);
4680 } 4683 }
4681 } 4684 }
4682 #endif 4685 #endif
4683 4686
4684 } // namespace content 4687 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698