| OLD | NEW |
| 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 #ifndef UI_COMPOSITOR_LAYER_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_H_ |
| 6 #define UI_COMPOSITOR_LAYER_H_ | 6 #define UI_COMPOSITOR_LAYER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 280 |
| 281 // Schedules a redraw of the layer tree at the compositor. | 281 // Schedules a redraw of the layer tree at the compositor. |
| 282 // Note that this _does not_ invalidate any region of this layer; use | 282 // Note that this _does not_ invalidate any region of this layer; use |
| 283 // SchedulePaint() for that. | 283 // SchedulePaint() for that. |
| 284 void ScheduleDraw(); | 284 void ScheduleDraw(); |
| 285 | 285 |
| 286 // Sends damaged rectangles recorded in |damaged_region_| to | 286 // Sends damaged rectangles recorded in |damaged_region_| to |
| 287 // |compostior_| to repaint the content. | 287 // |compostior_| to repaint the content. |
| 288 void SendDamagedRects(); | 288 void SendDamagedRects(); |
| 289 | 289 |
| 290 const SkRegion& damaged_region() const { return damaged_region_; } |
| 291 |
| 290 // Suppresses painting the content by disgarding damaged region and ignoring | 292 // Suppresses painting the content by disgarding damaged region and ignoring |
| 291 // new paint requests. | 293 // new paint requests. |
| 292 void SuppressPaint(); | 294 void SuppressPaint(); |
| 293 | 295 |
| 294 // Notifies the layer that the device scale factor has changed. | 296 // Notifies the layer that the device scale factor has changed. |
| 295 void OnDeviceScaleFactorChanged(float device_scale_factor); | 297 void OnDeviceScaleFactorChanged(float device_scale_factor); |
| 296 | 298 |
| 297 // Sets whether the layer should scale its content. If true, the canvas will | 299 // Sets whether the layer should scale its content. If true, the canvas will |
| 298 // be scaled in software rendering mode before it is passed to | 300 // be scaled in software rendering mode before it is passed to |
| 299 // |LayerDelegate::OnPaint|. | 301 // |LayerDelegate::OnPaint|. |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 // The size of the delegated frame in DIP, set when SetShowDelegatedContent | 494 // The size of the delegated frame in DIP, set when SetShowDelegatedContent |
| 493 // was called. | 495 // was called. |
| 494 gfx::Size delegated_frame_size_in_dip_; | 496 gfx::Size delegated_frame_size_in_dip_; |
| 495 | 497 |
| 496 DISALLOW_COPY_AND_ASSIGN(Layer); | 498 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 497 }; | 499 }; |
| 498 | 500 |
| 499 } // namespace ui | 501 } // namespace ui |
| 500 | 502 |
| 501 #endif // UI_COMPOSITOR_LAYER_H_ | 503 #endif // UI_COMPOSITOR_LAYER_H_ |
| OLD | NEW |