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

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

Issue 846063002: compositor: Fix texture flipping for SW mirroring with surfaceless (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: replace with custom task runner that does nothing. maybe this will work Created 5 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 | « ui/compositor/layer.h ('k') | ui/compositor/reflector.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 (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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 550
551 void Layer::SetTextureSize(gfx::Size texture_size_in_dip) { 551 void Layer::SetTextureSize(gfx::Size texture_size_in_dip) {
552 DCHECK(texture_layer_.get()); 552 DCHECK(texture_layer_.get());
553 if (frame_size_in_dip_ == texture_size_in_dip) 553 if (frame_size_in_dip_ == texture_size_in_dip)
554 return; 554 return;
555 frame_size_in_dip_ = texture_size_in_dip; 555 frame_size_in_dip_ = texture_size_in_dip;
556 RecomputeDrawsContentAndUVRect(); 556 RecomputeDrawsContentAndUVRect();
557 texture_layer_->SetNeedsDisplay(); 557 texture_layer_->SetNeedsDisplay();
558 } 558 }
559 559
560 void Layer::SetTextureFlipped(bool flipped) {
561 DCHECK(texture_layer_.get());
562 texture_layer_->SetFlipped(flipped);
563 }
564
565 bool Layer::TextureFlipped() const {
566 DCHECK(texture_layer_.get());
567 return texture_layer_->flipped();
568 }
569
560 void Layer::SetShowDelegatedContent(cc::DelegatedFrameProvider* frame_provider, 570 void Layer::SetShowDelegatedContent(cc::DelegatedFrameProvider* frame_provider,
561 gfx::Size frame_size_in_dip) { 571 gfx::Size frame_size_in_dip) {
562 DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR); 572 DCHECK(type_ == LAYER_TEXTURED || type_ == LAYER_SOLID_COLOR);
563 573
564 scoped_refptr<cc::DelegatedRendererLayer> new_layer = 574 scoped_refptr<cc::DelegatedRendererLayer> new_layer =
565 cc::DelegatedRendererLayer::Create(frame_provider); 575 cc::DelegatedRendererLayer::Create(frame_provider);
566 SwitchToLayer(new_layer); 576 SwitchToLayer(new_layer);
567 delegated_renderer_layer_ = new_layer; 577 delegated_renderer_layer_ = new_layer;
568 578
569 frame_size_in_dip_ = frame_size_in_dip; 579 frame_size_in_dip_ = frame_size_in_dip;
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 children_.end(), 1066 children_.end(),
1057 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection), 1067 std::bind2nd(std::mem_fun(&Layer::RemoveAnimatorsInTreeFromCollection),
1058 collection)); 1068 collection));
1059 } 1069 }
1060 1070
1061 bool Layer::IsAnimating() const { 1071 bool Layer::IsAnimating() const {
1062 return animator_.get() && animator_->is_animating(); 1072 return animator_.get() && animator_->is_animating();
1063 } 1073 }
1064 1074
1065 } // namespace ui 1075 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer.h ('k') | ui/compositor/reflector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698