| 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 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1215 if (use_validator) | 1215 if (use_validator) |
| 1216 output_surface_->SetOverlayCandidateValidator(new SingleOverlayValidator); | 1216 output_surface_->SetOverlayCandidateValidator(new SingleOverlayValidator); |
| 1217 | 1217 |
| 1218 renderer_ = base::WrapUnique(new OverlayInfoRendererGL( | 1218 renderer_ = base::WrapUnique(new OverlayInfoRendererGL( |
| 1219 &renderer_client_, &settings_, output_surface_.get(), | 1219 &renderer_client_, &settings_, output_surface_.get(), |
| 1220 resource_provider_.get())); | 1220 resource_provider_.get())); |
| 1221 } | 1221 } |
| 1222 | 1222 |
| 1223 void DrawFrame(RenderPassList* pass_list, const gfx::Rect& viewport_rect) { | 1223 void DrawFrame(RenderPassList* pass_list, const gfx::Rect& viewport_rect) { |
| 1224 renderer_->DrawFrame(pass_list, 1.f, gfx::ColorSpace(), viewport_rect, | 1224 renderer_->DrawFrame(pass_list, 1.f, gfx::ColorSpace(), viewport_rect, |
| 1225 viewport_rect, false); | 1225 viewport_rect); |
| 1226 } | 1226 } |
| 1227 void SwapBuffers() { | 1227 void SwapBuffers() { |
| 1228 renderer_->SwapBuffers(CompositorFrameMetadata()); | 1228 renderer_->SwapBuffers(CompositorFrameMetadata()); |
| 1229 output_surface_->OnSwapBuffersComplete(); | 1229 output_surface_->OnSwapBuffersComplete(); |
| 1230 renderer_->SwapBuffersComplete(); | 1230 renderer_->SwapBuffersComplete(); |
| 1231 } | 1231 } |
| 1232 void SwapBuffersWithoutComplete() { | 1232 void SwapBuffersWithoutComplete() { |
| 1233 renderer_->SwapBuffers(CompositorFrameMetadata()); | 1233 renderer_->SwapBuffers(CompositorFrameMetadata()); |
| 1234 } | 1234 } |
| 1235 void SwapBuffersComplete() { | 1235 void SwapBuffersComplete() { |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1649 | 1649 |
| 1650 ReturnResourceInUseQuery(resource2); | 1650 ReturnResourceInUseQuery(resource2); |
| 1651 ReturnResourceInUseQuery(resource3); | 1651 ReturnResourceInUseQuery(resource3); |
| 1652 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); | 1652 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource1)); |
| 1653 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource2)); | 1653 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource2)); |
| 1654 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource3)); | 1654 EXPECT_FALSE(resource_provider_->InUseByConsumer(resource3)); |
| 1655 } | 1655 } |
| 1656 | 1656 |
| 1657 } // namespace | 1657 } // namespace |
| 1658 } // namespace cc | 1658 } // namespace cc |
| OLD | NEW |