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

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

Issue 2919373002: cc: De-special-case SurfaceLayer code (Closed)
Patch Set: Fix cc_unittests Created 3 years, 6 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 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 "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/layers/solid_color_layer.h" 10 #include "cc/layers/solid_color_layer.h"
(...skipping 13 matching lines...) Expand all
24 24
25 namespace { 25 namespace {
26 26
27 scoped_refptr<cc::SurfaceLayer> CreateSurfaceLayer( 27 scoped_refptr<cc::SurfaceLayer> CreateSurfaceLayer(
28 cc::SurfaceManager* surface_manager, 28 cc::SurfaceManager* surface_manager,
29 cc::SurfaceInfo surface_info, 29 cc::SurfaceInfo surface_info,
30 bool surface_opaque) { 30 bool surface_opaque) {
31 // manager must outlive compositors using it. 31 // manager must outlive compositors using it.
32 auto layer = cc::SurfaceLayer::Create(surface_manager->reference_factory()); 32 auto layer = cc::SurfaceLayer::Create(surface_manager->reference_factory());
33 layer->SetPrimarySurfaceInfo(surface_info); 33 layer->SetPrimarySurfaceInfo(surface_info);
34 layer->SetFallbackSurfaceInfo(surface_info);
34 layer->SetBounds(surface_info.size_in_pixels()); 35 layer->SetBounds(surface_info.size_in_pixels());
35 layer->SetIsDrawable(true); 36 layer->SetIsDrawable(true);
36 layer->SetContentsOpaque(surface_opaque); 37 layer->SetContentsOpaque(surface_opaque);
37 38
38 return layer; 39 return layer;
39 } 40 }
40 41
41 void CopyOutputRequestCallback( 42 void CopyOutputRequestCallback(
42 scoped_refptr<cc::Layer> readback_layer, 43 scoped_refptr<cc::Layer> readback_layer,
43 cc::CopyOutputRequest::CopyOutputRequestCallback result_callback, 44 cc::CopyOutputRequest::CopyOutputRequestCallback result_callback,
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 support_ = cc::CompositorFrameSinkSupport::Create( 200 support_ = cc::CompositorFrameSinkSupport::Create(
200 this, surface_manager_, frame_sink_id_, is_root, 201 this, surface_manager_, frame_sink_id_, is_root,
201 handles_frame_sink_id_invalidation, needs_sync_points); 202 handles_frame_sink_id_invalidation, needs_sync_points);
202 } 203 }
203 204
204 cc::SurfaceId DelegatedFrameHostAndroid::SurfaceId() const { 205 cc::SurfaceId DelegatedFrameHostAndroid::SurfaceId() const {
205 return surface_info_.id(); 206 return surface_info_.id();
206 } 207 }
207 208
208 } // namespace ui 209 } // namespace ui
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp ('k') | ui/aura/local/window_port_local.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698