OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 #ifndef CC_LAYER_IMPL_H_ | 5 #ifndef CC_LAYER_IMPL_H_ |
6 #define CC_LAYER_IMPL_H_ | 6 #define CC_LAYER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "cc/cc_export.h" | 12 #include "cc/cc_export.h" |
13 #include "cc/draw_properties.h" | 13 #include "cc/draw_properties.h" |
14 #include "cc/input_handler.h" | 14 #include "cc/input_handler.h" |
15 #include "cc/layer_animation_controller.h" | 15 #include "cc/layer_animation_controller.h" |
16 #include "cc/layer_animation_value_observer.h" | 16 #include "cc/layer_animation_value_observer.h" |
17 #include "cc/region.h" | 17 #include "cc/region.h" |
18 #include "cc/render_pass.h" | 18 #include "cc/render_pass.h" |
19 #include "cc/render_surface_impl.h" | 19 #include "cc/render_surface_impl.h" |
20 #include "cc/resource_provider.h" | 20 #include "cc/resource_provider.h" |
21 #include "cc/scoped_ptr_vector.h" | 21 #include "cc/scoped_ptr_vector.h" |
22 #include "cc/shared_quad_state.h" | 22 #include "cc/shared_quad_state.h" |
23 #include "skia/ext/refptr.h" | 23 #include "skia/ext/refptr.h" |
24 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations
.h" | 24 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations
.h" |
25 #include "third_party/skia/include/core/SkColor.h" | 25 #include "third_party/skia/include/core/SkColor.h" |
26 #include "third_party/skia/include/core/SkImageFilter.h" | 26 #include "third_party/skia/include/core/SkImageFilter.h" |
| 27 #include "third_party/skia/include/core/SkPicture.h" |
27 #include "ui/gfx/rect.h" | 28 #include "ui/gfx/rect.h" |
28 #include "ui/gfx/rect_f.h" | 29 #include "ui/gfx/rect_f.h" |
29 #include "ui/gfx/transform.h" | 30 #include "ui/gfx/transform.h" |
30 | 31 |
31 namespace base { | 32 namespace base { |
32 class DictionaryValue; | 33 class DictionaryValue; |
33 } | 34 } |
34 | 35 |
35 namespace cc { | 36 namespace cc { |
36 | 37 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 void setHorizontalScrollbarLayer(ScrollbarLayerImpl*); | 275 void setHorizontalScrollbarLayer(ScrollbarLayerImpl*); |
275 ScrollbarLayerImpl* horizontalScrollbarLayer(); | 276 ScrollbarLayerImpl* horizontalScrollbarLayer(); |
276 const ScrollbarLayerImpl* horizontalScrollbarLayer() const; | 277 const ScrollbarLayerImpl* horizontalScrollbarLayer() const; |
277 | 278 |
278 void setVerticalScrollbarLayer(ScrollbarLayerImpl*); | 279 void setVerticalScrollbarLayer(ScrollbarLayerImpl*); |
279 ScrollbarLayerImpl* verticalScrollbarLayer(); | 280 ScrollbarLayerImpl* verticalScrollbarLayer(); |
280 const ScrollbarLayerImpl* verticalScrollbarLayer() const; | 281 const ScrollbarLayerImpl* verticalScrollbarLayer() const; |
281 | 282 |
282 gfx::Rect layerRectToContentRect(const gfx::RectF& layerRect) const; | 283 gfx::Rect layerRectToContentRect(const gfx::RectF& layerRect) const; |
283 | 284 |
| 285 virtual skia::RefPtr<SkPicture> getPicture(); |
| 286 |
284 protected: | 287 protected: |
285 LayerImpl(LayerTreeImpl* layerImpl, int); | 288 LayerImpl(LayerTreeImpl* layerImpl, int); |
286 | 289 |
287 // Get the color and size of the layer's debug border. | 290 // Get the color and size of the layer's debug border. |
288 virtual void getDebugBorderProperties(SkColor*, float* width) const; | 291 virtual void getDebugBorderProperties(SkColor*, float* width) const; |
289 | 292 |
290 void appendDebugBorderQuad(QuadSink&, const SharedQuadState*, AppendQuadsDat
a&) const; | 293 void appendDebugBorderQuad(QuadSink&, const SharedQuadState*, AppendQuadsDat
a&) const; |
291 | 294 |
292 virtual void dumpLayerProperties(std::string*, int indent) const; | 295 virtual void dumpLayerProperties(std::string*, int indent) const; |
293 static std::string indentString(int indent); | 296 static std::string indentString(int indent); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 // Group of properties that need to be computed based on the layer tree | 401 // Group of properties that need to be computed based on the layer tree |
399 // hierarchy before layers can be drawn. | 402 // hierarchy before layers can be drawn. |
400 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; | 403 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; |
401 | 404 |
402 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 405 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
403 }; | 406 }; |
404 | 407 |
405 } | 408 } |
406 | 409 |
407 #endif // CC_LAYER_IMPL_H_ | 410 #endif // CC_LAYER_IMPL_H_ |
OLD | NEW |