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

Unified Diff: samplecode/SampleApp.cpp

Issue 312553006: remove SkBounder -- unused and unloved (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: samplecode/SampleApp.cpp
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index ad03feacc8d5803cbd96bf19434565df1a9f77ee..7f2990bb9610045810425d188c1e32c23ffed5c7 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -4,6 +4,7 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+
#include "SampleApp.h"
#include "SkData.h"
@@ -2385,45 +2386,15 @@ void SampleView::draw(SkCanvas* canvas) {
}
}
-#include "SkBounder.h"
-
-class DebugHitTestBounder : public SkBounder {
-public:
- DebugHitTestBounder(int x, int y) {
- fLoc.set(x, y);
- }
-
- virtual bool onIRect(const SkIRect& bounds) SK_OVERRIDE {
- if (bounds.contains(fLoc.x(), fLoc.y())) {
- //
- // Set a break-point here to see what was being drawn under
- // the click point (just needed a line of code to stop the debugger)
- //
- bounds.centerX();
- }
- return true;
- }
-
-private:
- SkIPoint fLoc;
- typedef SkBounder INHERITED;
-};
-
void SampleView::onDraw(SkCanvas* canvas) {
this->onDrawBackground(canvas);
- DebugHitTestBounder bounder(fDebugHitTestLoc.x(), fDebugHitTestLoc.y());
- if (fDebugHitTest) {
- canvas->setBounder(&bounder);
- }
-
for (int i = 0; i < fRepeatCount; i++) {
SkAutoCanvasRestore acr(canvas, true);
this->onDrawContent(canvas);
}
fDebugHitTest = false;
scroggo 2014/06/03 13:52:59 Can you also remove fDebugHitTest? I think it will
reed1 2014/06/03 17:38:49 Done.
- canvas->setBounder(NULL);
}
void SampleView::onDrawBackground(SkCanvas* canvas) {

Powered by Google App Engine
This is Rietveld 408576698