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

Side by Side Diff: ui/android/delegated_frame_host_android.cc

Issue 2337913003: Fork cc::OutputSurface into cc::CompositorFrameSink. (Closed)
Patch Set: cfsfork: android-vulkan Created 4 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 | « ui/android/delegated_frame_host_android.h ('k') | ui/compositor/compositor.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/android/delegated_frame_host_android.h" 5 #include "ui/android/delegated_frame_host_android.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "cc/layers/solid_color_layer.h" 9 #include "cc/layers/solid_color_layer.h"
10 #include "cc/layers/surface_layer.h" 10 #include "cc/layers/surface_layer.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 surface_factory_->Destroy(current_frame_->surface_id); 197 surface_factory_->Destroy(current_frame_->surface_id);
198 current_frame_.reset(); 198 current_frame_.reset();
199 199
200 UpdateBackgroundLayer(); 200 UpdateBackgroundLayer();
201 } 201 }
202 202
203 bool DelegatedFrameHostAndroid::HasDelegatedContent() const { 203 bool DelegatedFrameHostAndroid::HasDelegatedContent() const {
204 return current_frame_.get() != nullptr; 204 return current_frame_.get() != nullptr;
205 } 205 }
206 206
207 void DelegatedFrameHostAndroid::OutputSurfaceChanged() { 207 void DelegatedFrameHostAndroid::CompositorFrameSinkChanged() {
208 DestroyDelegatedContent(); 208 DestroyDelegatedContent();
209 surface_factory_.reset(); 209 surface_factory_.reset();
210 } 210 }
211 211
212 void DelegatedFrameHostAndroid::UpdateBackgroundColor(SkColor color) { 212 void DelegatedFrameHostAndroid::UpdateBackgroundColor(SkColor color) {
213 background_layer_->SetBackgroundColor(color); 213 background_layer_->SetBackgroundColor(color);
214 } 214 }
215 215
216 void DelegatedFrameHostAndroid::UpdateContainerSizeinDIP( 216 void DelegatedFrameHostAndroid::UpdateContainerSizeinDIP(
217 const gfx::Size& size_in_dip) { 217 const gfx::Size& size_in_dip) {
(...skipping 28 matching lines...) Expand all
246 content_size_in_dip.width() < container_size_in_dip_.width() || 246 content_size_in_dip.width() < container_size_in_dip_.width() ||
247 content_size_in_dip.height() < container_size_in_dip_.height(); 247 content_size_in_dip.height() < container_size_in_dip_.height();
248 } else { 248 } else {
249 background_is_drawable = true; 249 background_is_drawable = true;
250 } 250 }
251 251
252 background_layer_->SetIsDrawable(background_is_drawable); 252 background_layer_->SetIsDrawable(background_is_drawable);
253 } 253 }
254 254
255 } // namespace ui 255 } // namespace ui
OLDNEW
« no previous file with comments | « ui/android/delegated_frame_host_android.h ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698