| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/layers/nine_patch_layer_impl.h" | 5 #include "cc/layers/nine_patch_layer_impl.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "cc/base/math_util.h" | 9 #include "cc/base/math_util.h" |
| 10 #include "cc/quads/solid_color_draw_quad.h" | 10 #include "cc/quads/solid_color_draw_quad.h" |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 gfx::Rect opaque_rect = opaque ? visible_rect : gfx::Rect(); | 314 gfx::Rect opaque_rect = opaque ? visible_rect : gfx::Rect(); |
| 315 if (!visible_rect.IsEmpty()) { | 315 if (!visible_rect.IsEmpty()) { |
| 316 gfx::RectF image_rect(NormalizedRect( | 316 gfx::RectF image_rect(NormalizedRect( |
| 317 patch.image_rect, image_bounds_.width(), image_bounds_.height())); | 317 patch.image_rect, image_bounds_.width(), image_bounds_.height())); |
| 318 TextureDrawQuad* quad = | 318 TextureDrawQuad* quad = |
| 319 render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>(); | 319 render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>(); |
| 320 quad->SetNew(shared_quad_state, patch.layer_rect, opaque_rect, | 320 quad->SetNew(shared_quad_state, patch.layer_rect, opaque_rect, |
| 321 visible_rect, resource, premultiplied_alpha, | 321 visible_rect, resource, premultiplied_alpha, |
| 322 image_rect.origin(), image_rect.bottom_right(), | 322 image_rect.origin(), image_rect.bottom_right(), |
| 323 SK_ColorTRANSPARENT, vertex_opacity, flipped, | 323 SK_ColorTRANSPARENT, vertex_opacity, flipped, |
| 324 nearest_neighbor_); | 324 nearest_neighbor_, false); |
| 325 ValidateQuadResources(quad); | 325 ValidateQuadResources(quad); |
| 326 } | 326 } |
| 327 } | 327 } |
| 328 } | 328 } |
| 329 | 329 |
| 330 const char* NinePatchLayerImpl::LayerTypeAsString() const { | 330 const char* NinePatchLayerImpl::LayerTypeAsString() const { |
| 331 return "cc::NinePatchLayerImpl"; | 331 return "cc::NinePatchLayerImpl"; |
| 332 } | 332 } |
| 333 | 333 |
| 334 base::DictionaryValue* NinePatchLayerImpl::LayerTreeAsJson() const { | 334 base::DictionaryValue* NinePatchLayerImpl::LayerTreeAsJson() const { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 354 list->AppendInteger(layer_occlusion_.x()); | 354 list->AppendInteger(layer_occlusion_.x()); |
| 355 list->AppendInteger(layer_occlusion_.y()); | 355 list->AppendInteger(layer_occlusion_.y()); |
| 356 list->AppendInteger(layer_occlusion_.width()); | 356 list->AppendInteger(layer_occlusion_.width()); |
| 357 list->AppendInteger(layer_occlusion_.height()); | 357 list->AppendInteger(layer_occlusion_.height()); |
| 358 result->Set("LayerOcclusion", list); | 358 result->Set("LayerOcclusion", list); |
| 359 | 359 |
| 360 return result; | 360 return result; |
| 361 } | 361 } |
| 362 | 362 |
| 363 } // namespace cc | 363 } // namespace cc |
| OLD | NEW |