summaryrefslogtreecommitdiffstats
path: root/ui/gfx/paint_vector_icon.h
diff options
context:
space:
mode:
authorMattias Nissler <mnissler@chromium.org>2015-07-09 14:10:39 +0200
committerMattias Nissler <mnissler@chromium.org>2015-07-09 12:11:31 +0000
commitb1fdeb5ac2b5ca9392e1e35aafe9a1230bc8a5b5 (patch)
tree4385479d9ad265b44cddb19713604ef6edcd4d36 /ui/gfx/paint_vector_icon.h
parent2dd0f4a821ca40e92b072d648a063e7d5a9838ce (diff)
downloadchromium_src-b1fdeb5ac2b5ca9392e1e35aafe9a1230bc8a5b5.zip
chromium_src-b1fdeb5ac2b5ca9392e1e35aafe9a1230bc8a5b5.tar.gz
chromium_src-b1fdeb5ac2b5ca9392e1e35aafe9a1230bc8a5b5.tar.bz2
Revert of Revert vector icon CLs. (patchset #1 id:1 of https://codereview.chromium.org/1228923002/)
Reason for revert: Reverting the revert - it turned out the failures weren't caused by the reverted CLs, but a bot configuration change happening at the same time: https://codereview.chromium.org/1212443005 Original issue's description: > Revert vector icon CLs. > > This reverts the following commits: > > ac1592c73bdd24eca2ea3e591e8f7b199627e6e7: "mandoline: Fix aura build for android." > 5490bafef2f11416bed41ad8017a6db500c67345: "Split vector icon commands into separate files aggregated at build time." > 33b823af3e63287dbe850c253ae97593411d4f43: "Introduce some util code for drawing vector assets." > > Reason for revert is 33b823af3e63287dbe850c253ae97593411d4f43, which > is one of the suspects for having broken browser_tests on Mac builders: > > http://build.chromium.org/p/chromium.mac/builders/Mac10.9%20Tests%20%28dbg%29/builds/8232 > http://build.chromium.org/p/chromium.mac/builders/Mac10.9%20Tests/builds/4313 > > Log output: > > NativeAppWindowCocoaBrowserTestInstance/NativeAppWindowCocoaBrowserTest.FrameColor/0 (run #1): > [ RUN ] NativeAppWindowCocoaBrowserTestInstance/NativeAppWindowCocoaBrowserTest.FrameColor/0 > [7393:1287:0708/150523:WARNING:vt_video_decode_accelerator.cc(206)] Failed to create hardware VideoToolbox session. Hardware accelerated video decoding will be disabled. > [7390:45827:0708/150524:WARNING:data_reduction_proxy_config.cc(630)] SPDY proxy OFF at startup > ../../chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm:645: Failure > Value of: [color redComponent] > Actual: 0.952941 > Expected: 0 > ../../chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm:646: Failure > Value of: [color greenComponent] > Actual: 0.952941 > Expected: 0 > ../../chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm:647: Failure > Value of: [color blueComponent] > Actual: 0.952941 > Expected: 1 > ../../chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm:654: Failure > Value of: [color redComponent] > Actual: 0.952941 > Expected: 1 > ../../chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm:655: Failure > Value of: [color greenComponent] > Actual: 0.952941 > Expected: 0 > ../../chrome/browser/ui/cocoa/apps/native_app_window_cocoa_browsertest.mm:656: Failure > Value of: [color blueComponent] > Actual: 0.952941 > Expected: 0 > [ FAILED ] NativeAppWindowCocoaBrowserTestInstance/NativeAppWindowCocoaBrowserTest.FrameColor/0, where GetParam() = false (1817 ms) > > BUG=508389 > TBR=estade@chromium.org > > Committed: https://chromium.googlesource.com/chromium/src/+/17399fb2b0a5fcba7c2dcb76ab2c597e6cf7c0db TBR= NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=508389 Review URL: https://codereview.chromium.org/1231843002 . Cr-Commit-Position: refs/heads/master@{#338017}
Diffstat (limited to 'ui/gfx/paint_vector_icon.h')
-rw-r--r--ui/gfx/paint_vector_icon.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/ui/gfx/paint_vector_icon.h b/ui/gfx/paint_vector_icon.h
new file mode 100644
index 0000000..de2fb22
--- /dev/null
+++ b/ui/gfx/paint_vector_icon.h
@@ -0,0 +1,27 @@
+// Copyright 2015 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.
+
+#ifndef UI_GFX_PAINT_VECTOR_ICON_H_
+#define UI_GFX_PAINT_VECTOR_ICON_H_
+
+#include "base/basictypes.h"
+#include "third_party/skia/include/core/SkColor.h"
+#include "ui/gfx/gfx_export.h"
+
+namespace gfx {
+
+class Canvas;
+enum class VectorIconId;
+
+// Draws a vector icon identified by |id| onto |canvas| at (0, 0). |dip_size|
+// is the length of a single edge of the square icon, in device independent
+// pixels. |color| is used as the fill.
+GFX_EXPORT void PaintVectorIcon(Canvas* canvas,
+ VectorIconId id,
+ size_t dip_size,
+ SkColor color);
+
+} // namespace gfx
+
+#endif // UI_GFX_PAINT_VECTOR_ICON_H_