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

Side by Side Diff: ui/compositor/layer.cc

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/compositor/layer.h ('k') | ui/gl/gl_context_egl.cc » ('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 (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 "ui/compositor/layer.h" 5 #include "ui/compositor/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 562
563 scoped_refptr<cc::DelegatedRendererLayer> new_layer = 563 scoped_refptr<cc::DelegatedRendererLayer> new_layer =
564 cc::DelegatedRendererLayer::Create(frame_provider); 564 cc::DelegatedRendererLayer::Create(frame_provider);
565 SwitchToLayer(new_layer); 565 SwitchToLayer(new_layer);
566 delegated_renderer_layer_ = new_layer; 566 delegated_renderer_layer_ = new_layer;
567 567
568 frame_size_in_dip_ = frame_size_in_dip; 568 frame_size_in_dip_ = frame_size_in_dip;
569 RecomputeDrawsContentAndUVRect(); 569 RecomputeDrawsContentAndUVRect();
570 } 570 }
571 571
572 void Layer::SetShowSurface(cc::SurfaceId id, gfx::Size frame_size_in_dip) { 572 void Layer::SetShowSurface(
573 cc::SurfaceId id,
574 const cc::SurfaceLayer::SatisfyCallback& satisfy_callback,
575 const cc::SurfaceLayer::RequireCallback& require_callback,
576 gfx::Size frame_size_in_dip) {
573 DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR); 577 DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR);
574 578
575 scoped_refptr<cc::SurfaceLayer> new_layer = cc::SurfaceLayer::Create(); 579 scoped_refptr<cc::SurfaceLayer> new_layer =
580 cc::SurfaceLayer::Create(satisfy_callback, require_callback);
576 new_layer->SetSurfaceId(id); 581 new_layer->SetSurfaceId(id);
577 SwitchToLayer(new_layer); 582 SwitchToLayer(new_layer);
578 surface_layer_ = new_layer; 583 surface_layer_ = new_layer;
579 584
580 frame_size_in_dip_ = frame_size_in_dip; 585 frame_size_in_dip_ = frame_size_in_dip;
581 RecomputeDrawsContentAndUVRect(); 586 RecomputeDrawsContentAndUVRect();
582 } 587 }
583 588
584 void Layer::SetShowSolidColorContent() { 589 void Layer::SetShowSolidColorContent() {
585 DCHECK_EQ(type_, LAYER_SOLID_COLOR); 590 DCHECK_EQ(type_, LAYER_SOLID_COLOR);
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 children_.end(), 1046 children_.end(),
1042 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), 1047 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection),
1043 collection)); 1048 collection));
1044 } 1049 }
1045 1050
1046 bool Layer::IsAnimating() const { 1051 bool Layer::IsAnimating() const {
1047 return animator_.get() && animator_->is_animating(); 1052 return animator_.get() && animator_->is_animating();
1048 } 1053 }
1049 1054
1050 } // namespace ui 1055 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer.h ('k') | ui/gl/gl_context_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698