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

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

Issue 2965103003: Test
Patch Set: c Created 3 years, 5 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
« no previous file with comments | « components/viz/service/display_embedder/shared_bitmap_allocation_notifier_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <set> 9 #include <set>
10 #include <tuple> 10 #include <tuple>
(...skipping 2585 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 auto new_surface_properties = 2596 auto new_surface_properties =
2597 RenderWidgetSurfaceProperties::FromCompositorFrame(frame); 2597 RenderWidgetSurfaceProperties::FromCompositorFrame(frame);
2598 2598
2599 if (local_surface_id == last_local_surface_id_ && 2599 if (local_surface_id == last_local_surface_id_ &&
2600 new_surface_properties != last_surface_properties_) { 2600 new_surface_properties != last_surface_properties_) {
2601 bad_message::ReceivedBadMessage( 2601 bad_message::ReceivedBadMessage(
2602 GetProcess(), bad_message::RWH_SURFACE_INVARIANTS_VIOLATION); 2602 GetProcess(), bad_message::RWH_SURFACE_INVARIANTS_VIOLATION);
2603 return; 2603 return;
2604 } 2604 }
2605 2605
2606 for (auto& entry : frame.metadata.shared_bitmaps_to_register) {
2607 viz::ServerSharedBitmapManager::current()->ChildAllocatedSharedBitmap(
2608 entry.size, entry.handle, entry.id);
2609 }
2610
2606 last_local_surface_id_ = local_surface_id; 2611 last_local_surface_id_ = local_surface_id;
2607 last_surface_properties_ = new_surface_properties; 2612 last_surface_properties_ = new_surface_properties;
2608 2613
2609 last_received_content_source_id_ = frame.metadata.content_source_id; 2614 last_received_content_source_id_ = frame.metadata.content_source_id;
2610 uint32_t frame_token = frame.metadata.frame_token; 2615 uint32_t frame_token = frame.metadata.frame_token;
2611 2616
2612 // |has_damage| is not transmitted. 2617 // |has_damage| is not transmitted.
2613 frame.metadata.begin_frame_ack.has_damage = true; 2618 frame.metadata.begin_frame_ack.has_damage = true;
2614 2619
2615 last_frame_metadata_ = frame.metadata.Clone(); 2620 last_frame_metadata_ = frame.metadata.Clone();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
2696 device::mojom::WakeLockType::PreventDisplaySleep, 2701 device::mojom::WakeLockType::PreventDisplaySleep,
2697 device::mojom::WakeLockReason::ReasonOther, "GetSnapshot", 2702 device::mojom::WakeLockReason::ReasonOther, "GetSnapshot",
2698 std::move(request)); 2703 std::move(request));
2699 } 2704 }
2700 } 2705 }
2701 return wake_lock_.get(); 2706 return wake_lock_.get();
2702 } 2707 }
2703 #endif 2708 #endif
2704 2709
2705 } // namespace content 2710 } // namespace content
OLDNEW
« no previous file with comments | « components/viz/service/display_embedder/shared_bitmap_allocation_notifier_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698