Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_OUTPUT_DC_LAYER_OVERLAY_H_ | 5 #ifndef CC_OUTPUT_DC_LAYER_OVERLAY_H_ |
| 6 #define CC_OUTPUT_DC_LAYER_OVERLAY_H_ | 6 #define CC_OUTPUT_DC_LAYER_OVERLAY_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "cc/quads/render_pass.h" | 9 #include "cc/quads/render_pass.h" |
| 10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 public: | 68 public: |
| 69 enum DCLayerResult { | 69 enum DCLayerResult { |
| 70 DC_LAYER_SUCCESS, | 70 DC_LAYER_SUCCESS, |
| 71 DC_LAYER_FAILED_QUAD_BLEND_MODE, | 71 DC_LAYER_FAILED_QUAD_BLEND_MODE, |
| 72 DC_LAYER_FAILED_TEXTURE_NOT_CANDIDATE, | 72 DC_LAYER_FAILED_TEXTURE_NOT_CANDIDATE, |
| 73 DC_LAYER_FAILED_OCCLUDED, | 73 DC_LAYER_FAILED_OCCLUDED, |
| 74 DC_LAYER_FAILED_UNKNOWN | 74 DC_LAYER_FAILED_UNKNOWN |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 void Process(ResourceProvider* resource_provider, | 77 void Process(ResourceProvider* resource_provider, |
| 78 bool was_reshaped, | |
| 78 const gfx::RectF& display_rect, | 79 const gfx::RectF& display_rect, |
| 79 QuadList* quad_list, | 80 QuadList* quad_list, |
| 80 gfx::Rect* overlay_damage_rect, | 81 gfx::Rect* overlay_damage_rect, |
| 81 gfx::Rect* damage_rect, | 82 gfx::Rect* damage_rect, |
| 82 DCLayerOverlayList* ca_layer_overlays); | 83 DCLayerOverlayList* ca_layer_overlays); |
| 83 void ClearOverlayState() { | 84 void ClearOverlayState() { |
| 84 previous_frame_underlay_rect_ = gfx::Rect(); | 85 previous_frame_underlay_rect_ = gfx::Rect(); |
| 85 previous_occlusion_bounding_box_ = gfx::Rect(); | 86 previous_occlusion_bounding_box_ = gfx::Rect(); |
| 86 } | 87 } |
| 87 | 88 |
| 88 private: | 89 private: |
| 89 DCLayerResult FromDrawQuad(ResourceProvider* resource_provider, | 90 DCLayerResult FromDrawQuad(ResourceProvider* resource_provider, |
| 90 const gfx::RectF& display_rect, | 91 const gfx::RectF& display_rect, |
| 91 QuadList::ConstIterator quad_list_begin, | 92 QuadList::ConstIterator quad_list_begin, |
| 92 QuadList::ConstIterator quad, | 93 QuadList::ConstIterator quad, |
| 93 DCLayerOverlay* ca_layer_overlay); | 94 DCLayerOverlay* ca_layer_overlay); |
| 94 | 95 |
|
ccameron
2017/05/11 08:49:17
It may be preferable to use OverlayProcessor::prev
| |
| 95 gfx::Rect previous_frame_underlay_rect_; | 96 gfx::Rect previous_frame_underlay_rect_; |
| 96 gfx::Rect previous_occlusion_bounding_box_; | 97 gfx::Rect previous_occlusion_bounding_box_; |
| 97 gfx::RectF previous_display_rect_; | |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 } // namespace cc | 100 } // namespace cc |
| 101 | 101 |
| 102 #endif // CC_OUTPUT_DC_LAYER_OVERLAY_H_ | 102 #endif // CC_OUTPUT_DC_LAYER_OVERLAY_H_ |
| OLD | NEW |