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

Side by Side Diff: blimp/client/core/compositor/blimp_compositor.cc

Issue 2621653002: Remove stretch_content_to_fill_bounds from cc::SurfaceLayer::SetSurfaceInfo (Closed)
Patch Set: up Created 3 years, 11 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 | « no previous file | cc/layers/surface_layer.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "blimp/client/core/compositor/blimp_compositor.h" 5 #include "blimp/client/core/compositor/blimp_compositor.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 current_surface_size_ = surface_size; 305 current_surface_size_ = surface_size;
306 306
307 // manager must outlive compositors using it. 307 // manager must outlive compositors using it.
308 cc::SurfaceManager* surface_manager = 308 cc::SurfaceManager* surface_manager =
309 GetEmbedderDeps()->GetSurfaceManager(); 309 GetEmbedderDeps()->GetSurfaceManager();
310 auto content_layer = 310 auto content_layer =
311 cc::SurfaceLayer::Create(surface_manager->reference_factory()); 311 cc::SurfaceLayer::Create(surface_manager->reference_factory());
312 cc::SurfaceId surface_id(surface_factory_->frame_sink_id(), 312 cc::SurfaceId surface_id(surface_factory_->frame_sink_id(),
313 local_frame_id_); 313 local_frame_id_);
314 content_layer->SetSurfaceInfo( 314 content_layer->SetSurfaceInfo(
315 cc::SurfaceInfo(surface_id, 1.f, surface_size), 315 cc::SurfaceInfo(surface_id, 1.f, surface_size));
316 false /* stretch_content_to_fill_bounds */);
317 content_layer->SetBounds(current_surface_size_); 316 content_layer->SetBounds(current_surface_size_);
318 content_layer->SetIsDrawable(true); 317 content_layer->SetIsDrawable(true);
319 content_layer->SetContentsOpaque(true); 318 content_layer->SetContentsOpaque(true);
320 319
321 layer_->AddChild(content_layer); 320 layer_->AddChild(content_layer);
322 } 321 }
323 322
324 surface_factory_->SubmitCompositorFrame( 323 surface_factory_->SubmitCompositorFrame(
325 local_frame_id_, std::move(frame), 324 local_frame_id_, std::move(frame),
326 base::Bind(&BlimpCompositor::SubmitCompositorFrameAck, 325 base::Bind(&BlimpCompositor::SubmitCompositorFrameAck,
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 // Destroy the old LayerTreeHost state. 438 // Destroy the old LayerTreeHost state.
440 host_.reset(); 439 host_.reset();
441 440
442 // Cancel any outstanding CompositorFrameSink requests. That way if we get an 441 // Cancel any outstanding CompositorFrameSink requests. That way if we get an
443 // async callback related to the old request we know to drop it. 442 // async callback related to the old request we know to drop it.
444 compositor_frame_sink_request_pending_ = false; 443 compositor_frame_sink_request_pending_ = false;
445 } 444 }
446 445
447 } // namespace client 446 } // namespace client
448 } // namespace blimp 447 } // namespace blimp
OLDNEW
« no previous file with comments | « no previous file | cc/layers/surface_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698