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

Side by Side Diff: cc/layers/delegated_renderer_layer.cc

Issue 1314943008: cc: Remove implicit conversions from Rect to RectF in src/cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rectfconvert-cc: rebase-and-sandwich-strategy Created 5 years, 3 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 | « cc/layers/delegated_renderer_layer.h ('k') | cc/layers/delegated_renderer_layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/layers/delegated_renderer_layer.h" 5 #include "cc/layers/delegated_renderer_layer.h"
6 6
7 #include "cc/layers/delegated_renderer_layer_impl.h" 7 #include "cc/layers/delegated_renderer_layer_impl.h"
8 #include "cc/output/delegated_frame_data.h" 8 #include "cc/output/delegated_frame_data.h"
9 #include "cc/quads/render_pass_draw_quad.h" 9 #include "cc/quads/render_pass_draw_quad.h"
10 #include "cc/trees/layer_tree_host.h" 10 #include "cc/trees/layer_tree_host.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 DelegatedRendererLayerImpl* delegated_impl = 66 DelegatedRendererLayerImpl* delegated_impl =
67 static_cast<DelegatedRendererLayerImpl*>(impl); 67 static_cast<DelegatedRendererLayerImpl*>(impl);
68 68
69 delegated_impl->CreateChildIdIfNeeded( 69 delegated_impl->CreateChildIdIfNeeded(
70 frame_provider_->GetReturnResourcesCallbackForImplThread()); 70 frame_provider_->GetReturnResourcesCallbackForImplThread());
71 71
72 if (frame_data_) 72 if (frame_data_)
73 delegated_impl->SetFrameData(frame_data_, frame_damage_); 73 delegated_impl->SetFrameData(frame_data_, frame_damage_);
74 frame_data_ = nullptr; 74 frame_data_ = nullptr;
75 frame_damage_ = gfx::RectF(); 75 frame_damage_ = gfx::Rect();
76 } 76 }
77 77
78 void DelegatedRendererLayer::ProviderHasNewFrame() { 78 void DelegatedRendererLayer::ProviderHasNewFrame() {
79 should_collect_new_frame_ = true; 79 should_collect_new_frame_ = true;
80 SetNeedsUpdate(); 80 SetNeedsUpdate();
81 // The active frame needs to be replaced and resources returned before the 81 // The active frame needs to be replaced and resources returned before the
82 // commit is called complete. 82 // commit is called complete.
83 SetNextCommitWaitsForActivation(); 83 SetNextCommitWaitsForActivation();
84 } 84 }
85 85
86 bool DelegatedRendererLayer::Update() { 86 bool DelegatedRendererLayer::Update() {
87 bool updated = Layer::Update(); 87 bool updated = Layer::Update();
88 if (!should_collect_new_frame_) 88 if (!should_collect_new_frame_)
89 return updated; 89 return updated;
90 90
91 frame_data_ = 91 frame_data_ =
92 frame_provider_->GetFrameDataAndRefResources(this, &frame_damage_); 92 frame_provider_->GetFrameDataAndRefResources(this, &frame_damage_);
93 should_collect_new_frame_ = false; 93 should_collect_new_frame_ = false;
94 94
95 SetNeedsPushProperties(); 95 SetNeedsPushProperties();
96 return true; 96 return true;
97 } 97 }
98 98
99 bool DelegatedRendererLayer::HasDelegatedContent() const { 99 bool DelegatedRendererLayer::HasDelegatedContent() const {
100 return true; 100 return true;
101 } 101 }
102 102
103 } // namespace cc 103 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/delegated_renderer_layer.h ('k') | cc/layers/delegated_renderer_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698