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

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

Issue 1962473002: exo: Add support for alpha_compositing interface to wayland bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wayland-protocols-alpha-compositing
Patch Set: address review feedback Created 4 years, 7 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/compositor/layer.h ('k') | no next file » | 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 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 void Layer::SetTextureFlipped(bool flipped) { 559 void Layer::SetTextureFlipped(bool flipped) {
560 DCHECK(texture_layer_.get()); 560 DCHECK(texture_layer_.get());
561 texture_layer_->SetFlipped(flipped); 561 texture_layer_->SetFlipped(flipped);
562 } 562 }
563 563
564 bool Layer::TextureFlipped() const { 564 bool Layer::TextureFlipped() const {
565 DCHECK(texture_layer_.get()); 565 DCHECK(texture_layer_.get());
566 return texture_layer_->flipped(); 566 return texture_layer_->flipped();
567 } 567 }
568 568
569 void Layer::SetTextureAlpha(float alpha) {
570 DCHECK(texture_layer_.get());
571 texture_layer_->SetVertexOpacity(alpha, alpha, alpha, alpha);
572 }
573
569 void Layer::SetShowSurface( 574 void Layer::SetShowSurface(
570 cc::SurfaceId surface_id, 575 cc::SurfaceId surface_id,
571 const cc::SurfaceLayer::SatisfyCallback& satisfy_callback, 576 const cc::SurfaceLayer::SatisfyCallback& satisfy_callback,
572 const cc::SurfaceLayer::RequireCallback& require_callback, 577 const cc::SurfaceLayer::RequireCallback& require_callback,
573 gfx::Size surface_size, 578 gfx::Size surface_size,
574 float scale, 579 float scale,
575 gfx::Size frame_size_in_dip) { 580 gfx::Size frame_size_in_dip) {
576 DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR); 581 DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR);
577 582
578 scoped_refptr<cc::SurfaceLayer> new_layer = 583 scoped_refptr<cc::SurfaceLayer> new_layer =
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 if (animator_) { 1021 if (animator_) {
1017 animator_->ResetCompositor(compositor); 1022 animator_->ResetCompositor(compositor);
1018 animator_->RemoveFromCollection(collection); 1023 animator_->RemoveFromCollection(collection);
1019 } 1024 }
1020 1025
1021 for (auto* child : children_) 1026 for (auto* child : children_)
1022 child->ResetCompositorForAnimatorsInTree(compositor); 1027 child->ResetCompositorForAnimatorsInTree(compositor);
1023 } 1028 }
1024 1029
1025 } // namespace ui 1030 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698