| OLD | NEW |
| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "cc/base/region.h" | 10 #include "cc/base/region.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 : OverlayProcessor(surface) { | 127 : OverlayProcessor(surface) { |
| 128 } | 128 } |
| 129 | 129 |
| 130 size_t DefaultOverlayProcessor::GetStrategyCount() { | 130 size_t DefaultOverlayProcessor::GetStrategyCount() { |
| 131 return strategies_.size(); | 131 return strategies_.size(); |
| 132 } | 132 } |
| 133 | 133 |
| 134 class OverlayOutputSurface : public OutputSurface { | 134 class OverlayOutputSurface : public OutputSurface { |
| 135 public: | 135 public: |
| 136 explicit OverlayOutputSurface(scoped_refptr<ContextProvider> context_provider) | 136 explicit OverlayOutputSurface(scoped_refptr<ContextProvider> context_provider) |
| 137 : OutputSurface(context_provider) { | 137 : OutputSurface(context_provider, nullptr, nullptr) { |
| 138 surface_size_ = kDisplaySize; | 138 surface_size_ = kDisplaySize; |
| 139 device_scale_factor_ = 1; | 139 device_scale_factor_ = 1; |
| 140 is_displayed_as_overlay_plane_ = true; | 140 is_displayed_as_overlay_plane_ = true; |
| 141 } | 141 } |
| 142 | 142 |
| 143 void SetScaleFactor(float scale_factor) { | 143 void SetScaleFactor(float scale_factor) { |
| 144 device_scale_factor_ = scale_factor; | 144 device_scale_factor_ = scale_factor; |
| 145 } | 145 } |
| 146 | 146 |
| 147 // OutputSurface implementation | 147 // OutputSurface implementation |
| (...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1622 | 1622 |
| 1623 // This completion corresponds to the third frame. | 1623 // This completion corresponds to the third frame. |
| 1624 SwapBuffersComplete(); | 1624 SwapBuffersComplete(); |
| 1625 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); | 1625 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); |
| 1626 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource2)); | 1626 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource2)); |
| 1627 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource3)); | 1627 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource3)); |
| 1628 } | 1628 } |
| 1629 | 1629 |
| 1630 } // namespace | 1630 } // namespace |
| 1631 } // namespace cc | 1631 } // namespace cc |
| OLD | NEW |