OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "modules/canvas2d/BaseRenderingContext2D.h" | 5 #include "modules/canvas2d/BaseRenderingContext2D.h" |
6 | 6 |
7 #include "bindings/core/v8/ExceptionMessages.h" | 7 #include "bindings/core/v8/ExceptionMessages.h" |
8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
9 #include "core/css/cssom/CSSURLImageValue.h" | 9 #include "core/css/cssom/CSSURLImageValue.h" |
10 #include "core/css/parser/CSSParser.h" | 10 #include "core/css/parser/CSSParser.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "platform/graphics/paint/PaintFlags.h" | 34 #include "platform/graphics/paint/PaintFlags.h" |
35 #include "platform/graphics/skia/SkiaUtils.h" | 35 #include "platform/graphics/skia/SkiaUtils.h" |
36 #include "platform/wtf/CheckedNumeric.h" | 36 #include "platform/wtf/CheckedNumeric.h" |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 BaseRenderingContext2D::BaseRenderingContext2D() | 40 BaseRenderingContext2D::BaseRenderingContext2D() |
41 : clip_antialiasing_(kNotAntiAliased), color_management_enabled_(false) { | 41 : clip_antialiasing_(kNotAntiAliased), color_management_enabled_(false) { |
42 state_stack_.push_back(CanvasRenderingContext2DState::Create()); | 42 state_stack_.push_back(CanvasRenderingContext2DState::Create()); |
43 color_management_enabled_ = | 43 color_management_enabled_ = |
44 RuntimeEnabledFeatures::experimentalCanvasFeaturesEnabled() && | 44 RuntimeEnabledFeatures::colorCanvasExtensionsEnabled(); |
45 RuntimeEnabledFeatures::colorCorrectRenderingEnabled(); | |
46 } | 45 } |
47 | 46 |
48 BaseRenderingContext2D::~BaseRenderingContext2D() {} | 47 BaseRenderingContext2D::~BaseRenderingContext2D() {} |
49 | 48 |
50 CanvasRenderingContext2DState& BaseRenderingContext2D::ModifiableState() { | 49 CanvasRenderingContext2DState& BaseRenderingContext2D::ModifiableState() { |
51 RealizeSaves(); | 50 RealizeSaves(); |
52 return *state_stack_.back(); | 51 return *state_stack_.back(); |
53 } | 52 } |
54 | 53 |
55 void BaseRenderingContext2D::RealizeSaves() { | 54 void BaseRenderingContext2D::RealizeSaves() { |
(...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1901 num_filters(0), | 1900 num_filters(0), |
1902 num_get_image_data_calls(0), | 1901 num_get_image_data_calls(0), |
1903 area_get_image_data_calls(0.0), | 1902 area_get_image_data_calls(0.0), |
1904 num_put_image_data_calls(0), | 1903 num_put_image_data_calls(0), |
1905 area_put_image_data_calls(0.0), | 1904 area_put_image_data_calls(0.0), |
1906 num_clear_rect_calls(0), | 1905 num_clear_rect_calls(0), |
1907 num_draw_focus_calls(0), | 1906 num_draw_focus_calls(0), |
1908 num_frames_since_reset(0) {} | 1907 num_frames_since_reset(0) {} |
1909 | 1908 |
1910 } // namespace blink | 1909 } // namespace blink |
OLD | NEW |