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

Side by Side Diff: components/exo/surface.cc

Issue 2543473004: cc: Move filters from RenderPassDrawQuad to RenderPass (Closed)
Patch Set: Address review comments Created 4 years 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 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 "components/exo/surface.h" 5 #include "components/exo/surface.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 uv_bottom_right.Scale(1.f / scaled_buffer_size.width(), 795 uv_bottom_right.Scale(1.f / scaled_buffer_size.width(),
796 1.f / scaled_buffer_size.height()); 796 1.f / scaled_buffer_size.height());
797 } 797 }
798 798
799 // pending_damage_ is in Surface coordinates. 799 // pending_damage_ is in Surface coordinates.
800 gfx::Rect damage_rect = full_damage 800 gfx::Rect damage_rect = full_damage
801 ? gfx::Rect(contents_surface_size) 801 ? gfx::Rect(contents_surface_size)
802 : gfx::SkIRectToRect(pending_damage_.getBounds()); 802 : gfx::SkIRectToRect(pending_damage_.getBounds());
803 803
804 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); 804 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create();
805 render_pass->SetAll(cc::RenderPassId(1, 1), gfx::Rect(contents_surface_size), 805 render_pass->SetNew(cc::RenderPassId(1, 1), gfx::Rect(contents_surface_size),
806 damage_rect, gfx::Transform(), true); 806 damage_rect, gfx::Transform());
807 807
808 gfx::Rect quad_rect = gfx::Rect(contents_surface_size); 808 gfx::Rect quad_rect = gfx::Rect(contents_surface_size);
809 cc::SharedQuadState* quad_state = 809 cc::SharedQuadState* quad_state =
810 render_pass->CreateAndAppendSharedQuadState(); 810 render_pass->CreateAndAppendSharedQuadState();
811 quad_state->quad_layer_bounds = contents_surface_size; 811 quad_state->quad_layer_bounds = contents_surface_size;
812 quad_state->visible_quad_layer_rect = quad_rect; 812 quad_state->visible_quad_layer_rect = quad_rect;
813 quad_state->opacity = state_.alpha; 813 quad_state->opacity = state_.alpha;
814 814
815 cc::CompositorFrame frame; 815 cc::CompositorFrame frame;
816 if (current_resource_.id) { 816 if (current_resource_.id) {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 882
883 int64_t Surface::GetPropertyInternal(const void* key, 883 int64_t Surface::GetPropertyInternal(const void* key,
884 int64_t default_value) const { 884 int64_t default_value) const {
885 std::map<const void*, Value>::const_iterator iter = prop_map_.find(key); 885 std::map<const void*, Value>::const_iterator iter = prop_map_.find(key);
886 if (iter == prop_map_.end()) 886 if (iter == prop_map_.end())
887 return default_value; 887 return default_value;
888 return iter->second.value; 888 return iter->second.value;
889 } 889 }
890 890
891 } // namespace exo 891 } // namespace exo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698