Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Side by Side Diff: skia/ext/analysis_canvas.cc

Issue 552633004: Fixed an uninitialized variable in the AnalysisCanvas. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/debug/trace_event.h" 5 #include "base/debug/trace_event.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "skia/ext/analysis_canvas.h" 7 #include "skia/ext/analysis_canvas.h"
8 #include "third_party/skia/include/core/SkDraw.h" 8 #include "third_party/skia/include/core/SkDraw.h"
9 #include "third_party/skia/include/core/SkRRect.h" 9 #include "third_party/skia/include/core/SkRRect.h"
10 #include "third_party/skia/include/core/SkShader.h" 10 #include "third_party/skia/include/core/SkShader.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 } 298 }
299 299
300 AnalysisCanvas::AnalysisCanvas(int width, int height) 300 AnalysisCanvas::AnalysisCanvas(int width, int height)
301 : INHERITED(MakeEmptyBitmap(width, height)), 301 : INHERITED(MakeEmptyBitmap(width, height)),
302 saved_stack_size_(0), 302 saved_stack_size_(0),
303 force_not_solid_stack_level_(kNoLayer), 303 force_not_solid_stack_level_(kNoLayer),
304 force_not_transparent_stack_level_(kNoLayer), 304 force_not_transparent_stack_level_(kNoLayer),
305 is_forced_not_solid_(false), 305 is_forced_not_solid_(false),
306 is_forced_not_transparent_(false), 306 is_forced_not_transparent_(false),
307 is_solid_color_(true), 307 is_solid_color_(true),
308 color_(SK_ColorTRANSPARENT),
308 is_transparent_(true), 309 is_transparent_(true),
309 draw_op_count_(0) {} 310 draw_op_count_(0) {
311 }
310 312
311 AnalysisCanvas::~AnalysisCanvas() {} 313 AnalysisCanvas::~AnalysisCanvas() {}
312 314
313 bool AnalysisCanvas::GetColorIfSolid(SkColor* color) const { 315 bool AnalysisCanvas::GetColorIfSolid(SkColor* color) const {
314 if (is_transparent_) { 316 if (is_transparent_) {
315 *color = SK_ColorTRANSPARENT; 317 *color = SK_ColorTRANSPARENT;
316 return true; 318 return true;
317 } 319 }
318 if (is_solid_color_) { 320 if (is_solid_color_) {
319 *color = color_; 321 *color = color_;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 force_not_transparent_stack_level_ = kNoLayer; 443 force_not_transparent_stack_level_ = kNoLayer;
442 } 444 }
443 } 445 }
444 446
445 INHERITED::willRestore(); 447 INHERITED::willRestore();
446 } 448 }
447 449
448 } // namespace skia 450 } // namespace skia
449 451
450 452
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698