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

Side by Side Diff: cc/layers/surface_layer_impl.cc

Issue 304203005: Remove const LayerImpl* from QuadSink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onlyQuadSink
Patch Set: Created 6 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "cc/layers/surface_layer_impl.h" 5 #include "cc/layers/surface_layer_impl.h"
6 6
7 #include "cc/debug/debug_colors.h" 7 #include "cc/debug/debug_colors.h"
8 #include "cc/layers/quad_sink.h" 8 #include "cc/layers/quad_sink.h"
9 #include "cc/quads/surface_draw_quad.h" 9 #include "cc/quads/surface_draw_quad.h"
10 10
(...skipping 30 matching lines...) Expand all
41 PopulateSharedQuadState(shared_quad_state); 41 PopulateSharedQuadState(shared_quad_state);
42 42
43 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); 43 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data);
44 44
45 if (!surface_id_) 45 if (!surface_id_)
46 return; 46 return;
47 47
48 scoped_ptr<SurfaceDrawQuad> quad = SurfaceDrawQuad::Create(); 48 scoped_ptr<SurfaceDrawQuad> quad = SurfaceDrawQuad::Create();
49 gfx::Rect quad_rect(content_bounds()); 49 gfx::Rect quad_rect(content_bounds());
50 gfx::Rect visible_quad_rect = quad_sink->UnoccludedContentRect( 50 gfx::Rect visible_quad_rect = quad_sink->UnoccludedContentRect(
51 quad_rect, draw_properties().target_space_transform); 51 this, quad_rect, draw_properties().target_space_transform);
52 if (visible_quad_rect.IsEmpty()) 52 if (visible_quad_rect.IsEmpty())
53 return; 53 return;
54 quad->SetNew(shared_quad_state, quad_rect, visible_quad_rect, surface_id_); 54 quad->SetNew(shared_quad_state, quad_rect, visible_quad_rect, surface_id_);
55 quad_sink->Append(quad.PassAs<DrawQuad>()); 55 quad_sink->Append(quad.PassAs<DrawQuad>());
56 } 56 }
57 57
58 void SurfaceLayerImpl::GetDebugBorderProperties(SkColor* color, 58 void SurfaceLayerImpl::GetDebugBorderProperties(SkColor* color,
59 float* width) const { 59 float* width) const {
60 *color = DebugColors::SurfaceLayerBorderColor(); 60 *color = DebugColors::SurfaceLayerBorderColor();
61 *width = DebugColors::SurfaceLayerBorderWidth(layer_tree_impl()); 61 *width = DebugColors::SurfaceLayerBorderWidth(layer_tree_impl());
62 } 62 }
63 63
64 void SurfaceLayerImpl::AsValueInto(base::DictionaryValue* dict) const { 64 void SurfaceLayerImpl::AsValueInto(base::DictionaryValue* dict) const {
65 LayerImpl::AsValueInto(dict); 65 LayerImpl::AsValueInto(dict);
66 dict->SetInteger("surface_id", surface_id_); 66 dict->SetInteger("surface_id", surface_id_);
67 } 67 }
68 68
69 const char* SurfaceLayerImpl::LayerTypeAsString() const { 69 const char* SurfaceLayerImpl::LayerTypeAsString() const {
70 return "cc::SurfaceLayerImpl"; 70 return "cc::SurfaceLayerImpl";
71 } 71 }
72 72
73 } // namespace cc 73 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698