layer_type.cc 634 B

1234567891011121314151617181920212223242526
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ui/compositor/layer_type.h"
  5. #include "base/notreached.h"
  6. namespace ui {
  7. base::StringPiece LayerTypeToString(LayerType type) {
  8. switch (type) {
  9. case LayerType::LAYER_NOT_DRAWN:
  10. return "not_drawn";
  11. case LayerType::LAYER_TEXTURED:
  12. return "textured";
  13. case LayerType::LAYER_SOLID_COLOR:
  14. return "solid_color";
  15. case LayerType::LAYER_NINE_PATCH:
  16. return "nine_patch";
  17. }
  18. NOTREACHED();
  19. return {};
  20. }
  21. } // namespace ui