OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/exo/surface.h" | 5 #include "components/exo/surface.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 | 564 |
565 void Surface::UnregisterCursorProvider(Pointer* provider) { | 565 void Surface::UnregisterCursorProvider(Pointer* provider) { |
566 cursor_providers_.erase(provider); | 566 cursor_providers_.erase(provider); |
567 } | 567 } |
568 | 568 |
569 gfx::NativeCursor Surface::GetCursor() { | 569 gfx::NativeCursor Surface::GetCursor() { |
570 // What cursor we display when we have multiple cursor providers is not | 570 // What cursor we display when we have multiple cursor providers is not |
571 // important. Return the first non-null cursor. | 571 // important. Return the first non-null cursor. |
572 for (auto* cursor_provider : cursor_providers_) { | 572 for (auto* cursor_provider : cursor_providers_) { |
573 gfx::NativeCursor cursor = cursor_provider->GetCursor(); | 573 gfx::NativeCursor cursor = cursor_provider->GetCursor(); |
574 if (cursor != ui::kCursorNull) | 574 if (cursor != ui::CursorType::kNull) |
575 return cursor; | 575 return cursor; |
576 } | 576 } |
577 return ui::kCursorNull; | 577 return ui::CursorType::kNull; |
578 } | 578 } |
579 | 579 |
580 void Surface::SetSurfaceDelegate(SurfaceDelegate* delegate) { | 580 void Surface::SetSurfaceDelegate(SurfaceDelegate* delegate) { |
581 DCHECK(!delegate_ || !delegate); | 581 DCHECK(!delegate_ || !delegate); |
582 delegate_ = delegate; | 582 delegate_ = delegate; |
583 } | 583 } |
584 | 584 |
585 bool Surface::HasSurfaceDelegate() const { | 585 bool Surface::HasSurfaceDelegate() const { |
586 return !!delegate_; | 586 return !!delegate_; |
587 } | 587 } |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
876 render_pass->CreateAndAppendDrawQuad<cc::SolidColorDrawQuad>(); | 876 render_pass->CreateAndAppendDrawQuad<cc::SolidColorDrawQuad>(); |
877 solid_quad->SetNew(quad_state, quad_rect, quad_rect, SK_ColorBLACK, false); | 877 solid_quad->SetNew(quad_state, quad_rect, quad_rect, SK_ColorBLACK, false); |
878 } | 878 } |
879 | 879 |
880 frame.render_pass_list.push_back(std::move(render_pass)); | 880 frame.render_pass_list.push_back(std::move(render_pass)); |
881 compositor_frame_sink_holder_->GetCompositorFrameSink() | 881 compositor_frame_sink_holder_->GetCompositorFrameSink() |
882 ->SubmitCompositorFrame(local_surface_id_, std::move(frame)); | 882 ->SubmitCompositorFrame(local_surface_id_, std::move(frame)); |
883 } | 883 } |
884 | 884 |
885 } // namespace exo | 885 } // namespace exo |
OLD | NEW |