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

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

Issue 13863015: Add flag for drawing layers to screen with Ganesh (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again Created 7 years, 7 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 | « content/renderer/render_widget.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/debug/trace_event.h" 5 #include "base/debug/trace_event.h"
6 #include "skia/ext/analysis_canvas.h" 6 #include "skia/ext/analysis_canvas.h"
7 #include "third_party/skia/include/core/SkDevice.h" 7 #include "third_party/skia/include/core/SkDevice.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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 65
66 } // namespace 66 } // namespace
67 67
68 namespace skia { 68 namespace skia {
69 69
70 AnalysisDevice::AnalysisDevice(const SkBitmap& bm) 70 AnalysisDevice::AnalysisDevice(const SkBitmap& bm)
71 : INHERITED(bm) 71 : INHERITED(bm)
72 , isForcedNotSolid_(false) 72 , isForcedNotSolid_(false)
73 , isForcedNotTransparent_(false) 73 , isForcedNotTransparent_(false)
74 , isSolidColor_(false) 74 , isSolidColor_(true)
75 , isTransparent_(false) 75 , isTransparent_(true)
76 , hasText_(false) { 76 , hasText_(false) {
77 } 77 }
78 78
79 AnalysisDevice::~AnalysisDevice() { 79 AnalysisDevice::~AnalysisDevice() {
80
81 } 80 }
82 81
83 bool AnalysisDevice::getColorIfSolid(SkColor* color) const { 82 bool AnalysisDevice::getColorIfSolid(SkColor* color) const {
84 if (isTransparent_) { 83 if (isTransparent_) {
85 *color = SK_ColorTRANSPARENT; 84 *color = SK_ColorTRANSPARENT;
86 return true; 85 return true;
87 } 86 }
88 if (isSolidColor_) { 87 if (isSolidColor_) {
89 *color = color_; 88 *color = color_;
90 return true; 89 return true;
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 if (savedStackSize_ < forceNotTransparentStackLevel_) { 384 if (savedStackSize_ < forceNotTransparentStackLevel_) {
386 (static_cast<AnalysisDevice*>(getDevice()))->setForceNotTransparent(false) ; 385 (static_cast<AnalysisDevice*>(getDevice()))->setForceNotTransparent(false) ;
387 forceNotTransparentStackLevel_ = kNoLayer; 386 forceNotTransparentStackLevel_ = kNoLayer;
388 } 387 }
389 } 388 }
390 } 389 }
391 390
392 } // namespace skia 391 } // namespace skia
393 392
394 393
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | skia/ext/analysis_canvas_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698