Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: cc/output/overlay_unittest.cc

Issue 2002303002: Consolidate OutputSurface constructors into GL vs Vulkan. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: outputsurface-constructors: rebase-and-fixcrash Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/output/output_surface_unittest.cc ('k') | cc/output/renderer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/output/output_surface_unittest.cc ('k') | cc/output/renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698