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 "content/browser/renderer_host/browser_compositor_view_mac.h" | 5 #include "content/browser/renderer_host/browser_compositor_view_mac.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 278 |
279 void BrowserCompositorMac::SetHasTransparentBackground(bool transparent) { | 279 void BrowserCompositorMac::SetHasTransparentBackground(bool transparent) { |
280 DCHECK(!has_been_destroyed_); | 280 DCHECK(!has_been_destroyed_); |
281 has_transparent_background_ = transparent; | 281 has_transparent_background_ = transparent; |
282 if (recyclable_compositor_) { | 282 if (recyclable_compositor_) { |
283 recyclable_compositor_->compositor()->SetHostHasTransparentBackground( | 283 recyclable_compositor_->compositor()->SetHostHasTransparentBackground( |
284 has_transparent_background_); | 284 has_transparent_background_); |
285 } | 285 } |
286 } | 286 } |
287 | 287 |
| 288 void BrowserCompositorMac::SetDisplayColorSpace( |
| 289 const gfx::ColorSpace& color_space) { |
| 290 if (recyclable_compositor_) |
| 291 recyclable_compositor_->compositor()->SetDisplayColorSpace(color_space); |
| 292 } |
| 293 |
288 void BrowserCompositorMac::UpdateVSyncParameters( | 294 void BrowserCompositorMac::UpdateVSyncParameters( |
289 const base::TimeTicks& timebase, | 295 const base::TimeTicks& timebase, |
290 const base::TimeDelta& interval) { | 296 const base::TimeDelta& interval) { |
291 DCHECK(!has_been_destroyed_); | 297 DCHECK(!has_been_destroyed_); |
292 if (recyclable_compositor_) { | 298 if (recyclable_compositor_) { |
293 recyclable_compositor_->compositor() | 299 recyclable_compositor_->compositor() |
294 ->vsync_manager() | 300 ->vsync_manager() |
295 ->UpdateVSyncParameters(timebase, interval); | 301 ->UpdateVSyncParameters(timebase, interval); |
296 } | 302 } |
297 } | 303 } |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 } | 380 } |
375 } | 381 } |
376 | 382 |
377 // static | 383 // static |
378 void BrowserCompositorMac::DisableRecyclingForShutdown() { | 384 void BrowserCompositorMac::DisableRecyclingForShutdown() { |
379 g_has_shut_down = true; | 385 g_has_shut_down = true; |
380 g_spare_recyclable_compositor.Get().reset(); | 386 g_spare_recyclable_compositor.Get().reset(); |
381 } | 387 } |
382 | 388 |
383 } // namespace content | 389 } // namespace content |
OLD | NEW |