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

Side by Side Diff: tests/DeferredCanvasTest.cpp

Issue 19977003: drawBitmap* cleanup (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fixed bugs Created 7 years, 4 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 | « src/utils/SkPictureUtils.cpp ('k') | 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 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "Test.h" 8 #include "Test.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkBitmapProcShader.h" 10 #include "SkBitmapProcShader.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 REPORTER_ASSERT(reporter, canvas->isFreshFrame()); 236 REPORTER_ASSERT(reporter, canvas->isFreshFrame());
237 } 237 }
238 } 238 }
239 239
240 class MockDevice : public SkDevice { 240 class MockDevice : public SkDevice {
241 public: 241 public:
242 MockDevice(const SkBitmap& bm) : SkDevice(bm) { 242 MockDevice(const SkBitmap& bm) : SkDevice(bm) {
243 fDrawBitmapCallCount = 0; 243 fDrawBitmapCallCount = 0;
244 } 244 }
245 virtual void drawBitmap(const SkDraw&, const SkBitmap&, 245 virtual void drawBitmap(const SkDraw&, const SkBitmap&,
246 const SkIRect*,
247 const SkMatrix&, const SkPaint&) SK_OVERRIDE { 246 const SkMatrix&, const SkPaint&) SK_OVERRIDE {
248 fDrawBitmapCallCount++; 247 fDrawBitmapCallCount++;
249 } 248 }
250 249
251 int fDrawBitmapCallCount; 250 int fDrawBitmapCallCount;
252 }; 251 };
253 252
254 // Verifies that the deferred canvas triggers a flush when its memory 253 // Verifies that the deferred canvas triggers a flush when its memory
255 // limit is exceeded 254 // limit is exceeded
256 static void TestDeferredCanvasMemoryLimit(skiatest::Reporter* reporter) { 255 static void TestDeferredCanvasMemoryLimit(skiatest::Reporter* reporter) {
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 TestDeferredCanvasSurface(reporter, NULL); 692 TestDeferredCanvasSurface(reporter, NULL);
694 TestDeferredCanvasSetSurface(reporter, NULL); 693 TestDeferredCanvasSetSurface(reporter, NULL);
695 if (NULL != factory) { 694 if (NULL != factory) {
696 TestDeferredCanvasSurface(reporter, factory); 695 TestDeferredCanvasSurface(reporter, factory);
697 TestDeferredCanvasSetSurface(reporter, factory); 696 TestDeferredCanvasSetSurface(reporter, factory);
698 } 697 }
699 } 698 }
700 699
701 #include "TestClassDef.h" 700 #include "TestClassDef.h"
702 DEFINE_GPUTESTCLASS("DeferredCanvas", TestDeferredCanvasClass, TestDeferredCanva s) 701 DEFINE_GPUTESTCLASS("DeferredCanvas", TestDeferredCanvasClass, TestDeferredCanva s)
OLDNEW
« no previous file with comments | « src/utils/SkPictureUtils.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698