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

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

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 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 | « skia/ext/SkDiscardableMemory_chrome.cc ('k') | 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/logging.h" 5 #include "base/logging.h"
6 #include "base/trace_event/trace_event.h" 6 #include "base/trace_event/trace_event.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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 SetForceNotSolid(true); 411 SetForceNotSolid(true);
412 } 412 }
413 } 413 }
414 414
415 // If after we draw to the save layer, we have to blend with the current 415 // If after we draw to the save layer, we have to blend with the current
416 // layer using any part of the current layer's alpha, then we can 416 // layer using any part of the current layer's alpha, then we can
417 // conservatively say that the canvas will not be transparent. 417 // conservatively say that the canvas will not be transparent.
418 SkXfermode::Mode xfermode = SkXfermode::kSrc_Mode; 418 SkXfermode::Mode xfermode = SkXfermode::kSrc_Mode;
419 if (paint) 419 if (paint)
420 SkXfermode::AsMode(paint->getXfermode(), &xfermode); 420 SkXfermode::AsMode(paint->getXfermode(), &xfermode);
421 if (xfermode != SkXfermode::kSrc_Mode) { 421 if (xfermode != SkXfermode::kDst_Mode) {
422 if (force_not_transparent_stack_level_ == kNoLayer) { 422 if (force_not_transparent_stack_level_ == kNoLayer) {
423 force_not_transparent_stack_level_ = saved_stack_size_; 423 force_not_transparent_stack_level_ = saved_stack_size_;
424 SetForceNotTransparent(true); 424 SetForceNotTransparent(true);
425 } 425 }
426 } 426 }
427 427
428 INHERITED::willSaveLayer(bounds, paint, flags); 428 INHERITED::willSaveLayer(bounds, paint, flags);
429 // Actually saving a layer here could cause a new bitmap to be created 429 // Actually saving a layer here could cause a new bitmap to be created
430 // and real rendering to occur. 430 // and real rendering to occur.
431 return kNoLayer_SaveLayerStrategy; 431 return kNoLayer_SaveLayerStrategy;
(...skipping 12 matching lines...) Expand all
444 force_not_transparent_stack_level_ = kNoLayer; 444 force_not_transparent_stack_level_ = kNoLayer;
445 } 445 }
446 } 446 }
447 447
448 INHERITED::willRestore(); 448 INHERITED::willRestore();
449 } 449 }
450 450
451 } // namespace skia 451 } // namespace skia
452 452
453 453
OLDNEW
« no previous file with comments | « skia/ext/SkDiscardableMemory_chrome.cc ('k') | skia/ext/analysis_canvas_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698