| Index: cc/resources/raster_mode.cc
|
| diff --git a/cc/resources/raster_mode.cc b/cc/resources/raster_mode.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b35bc0be42d3d706319f5046a32f83565c0f2c25
|
| --- /dev/null
|
| +++ b/cc/resources/raster_mode.cc
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "cc/resources/raster_mode.h"
|
| +
|
| +#include "base/logging.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "base/values.h"
|
| +
|
| +namespace cc {
|
| +
|
| +scoped_ptr<base::Value> RasterModeAsValue(RasterMode raster_mode) {
|
| + switch (raster_mode) {
|
| + case HIGH_QUALITY_NO_LCD_RASTER_MODE:
|
| + return scoped_ptr<base::Value>(
|
| + base::Value::CreateStringValue("HIGH_QUALITY_NO_LCD_RASTER_MODE"));
|
| + case HIGH_QUALITY_RASTER_MODE:
|
| + return scoped_ptr<base::Value>(
|
| + base::Value::CreateStringValue("HIGH_QUALITY_RASTER_MODE"));
|
| + case LOW_QUALITY_RASTER_MODE:
|
| + return scoped_ptr<base::Value>(
|
| + base::Value::CreateStringValue("LOW_QUALITY_RASTER_MODE"));
|
| + case NUM_RASTER_MODES:
|
| + default:
|
| + NOTREACHED() << "Unrecognized RasterMode value " << raster_mode;
|
| + return scoped_ptr<base::Value>(
|
| + base::Value::CreateStringValue("<unknown RasterMode value>"));
|
| + }
|
| +}
|
| +
|
| +} // namespace cc
|
|
|