Instrumented libraries: update configure flags for libgcrypt11.
[chromium-blink-merge.git] / skia / ext / opacity_draw_filter.h
bloba2a686cad8da38fa6f50076ce1da476e4d379315
1 // Copyright 2013 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.
5 #ifndef SKIA_EXT_OPACITY_DRAW_FILTER_H
6 #define SKIA_EXT_OPACITY_DRAW_FILTER_H
8 #include "base/values.h"
9 #include "third_party/skia/include/core/SkDrawFilter.h"
11 class SkPaint;
13 namespace skia {
15 // This filter allows setting an opacity on every draw call to a canvas, and to
16 // disable image filtering. Note that the opacity setting is only correct in
17 // very limited conditions: when there is only zero or one opaque, nonlayer
18 // draw for every pixel in the surface.
19 class SK_API OpacityDrawFilter : public SkDrawFilter {
20 public:
21 OpacityDrawFilter(float opacity, bool disable_image_filtering);
22 virtual ~OpacityDrawFilter();
23 virtual bool filter(SkPaint* paint, SkDrawFilter::Type type) OVERRIDE;
25 private:
26 int alpha_;
27 bool disable_image_filtering_;
30 } // namespace skia
32 #endif // SKIA_EXT_OPACITY_DRAW_FILTER_H