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

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

Issue 331283002: stop calling deprecated setConfig (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + android typo Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | skia/ext/analysis_canvas_unittest.cc » ('j') | 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 int index_count, 270 int index_count,
271 const SkPaint& paint) { 271 const SkPaint& paint) {
272 is_solid_color_ = false; 272 is_solid_color_ = false;
273 is_transparent_ = false; 273 is_transparent_ = false;
274 } 274 }
275 275
276 // Needed for now, since SkCanvas requires a bitmap, even if it is not backed 276 // Needed for now, since SkCanvas requires a bitmap, even if it is not backed
277 // by any pixels 277 // by any pixels
278 static SkBitmap MakeEmptyBitmap(int width, int height) { 278 static SkBitmap MakeEmptyBitmap(int width, int height) {
279 SkBitmap bitmap; 279 SkBitmap bitmap;
280 bitmap.setConfig(SkBitmap::kNo_Config, width, height); 280 bitmap.setInfo(SkImageInfo::MakeUnknown(width, height));
281 return bitmap; 281 return bitmap;
282 } 282 }
283 283
284 AnalysisCanvas::AnalysisCanvas(int width, int height) 284 AnalysisCanvas::AnalysisCanvas(int width, int height)
285 : INHERITED(MakeEmptyBitmap(width, height)), 285 : INHERITED(MakeEmptyBitmap(width, height)),
286 saved_stack_size_(0), 286 saved_stack_size_(0),
287 force_not_solid_stack_level_(kNoLayer), 287 force_not_solid_stack_level_(kNoLayer),
288 force_not_transparent_stack_level_(kNoLayer), 288 force_not_transparent_stack_level_(kNoLayer),
289 is_forced_not_solid_(false), 289 is_forced_not_solid_(false),
290 is_forced_not_transparent_(false), 290 is_forced_not_transparent_(false),
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 force_not_transparent_stack_level_ = kNoLayer; 413 force_not_transparent_stack_level_ = kNoLayer;
414 } 414 }
415 } 415 }
416 416
417 INHERITED::willRestore(); 417 INHERITED::willRestore();
418 } 418 }
419 419
420 } // namespace skia 420 } // namespace skia
421 421
422 422
OLDNEW
« no previous file with comments | « no previous file | skia/ext/analysis_canvas_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698