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

Side by Side Diff: src/core/SkCanvas.cpp

Issue 212933002: Actually identify required saveLayers in SkGpuDevice::EXPERIMENTAL_drawPicture (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Addressed code review issue Created 6 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 | Annotate | Revision Log
« no previous file with comments | « include/gpu/SkGpuDevice.h ('k') | src/core/SkDevice.cpp » ('j') | 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 2008 The Android Open Source Project 3 * Copyright 2008 The Android Open Source Project
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 8
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 2523 matching lines...) Expand 10 before | Expand all | Expand 10 after
2534 if (NULL != device) { 2534 if (NULL != device) {
2535 device->EXPERIMENTAL_optimize(picture); 2535 device->EXPERIMENTAL_optimize(picture);
2536 } 2536 }
2537 } 2537 }
2538 2538
2539 void SkCanvas::drawPicture(SkPicture& picture) { 2539 void SkCanvas::drawPicture(SkPicture& picture) {
2540 SkBaseDevice* device = this->getTopDevice(); 2540 SkBaseDevice* device = this->getTopDevice();
2541 if (NULL != device) { 2541 if (NULL != device) {
2542 // Canvas has to first give the device the opportunity to render 2542 // Canvas has to first give the device the opportunity to render
2543 // the picture itself. 2543 // the picture itself.
2544 if (device->EXPERIMENTAL_drawPicture(picture)) { 2544 if (device->EXPERIMENTAL_drawPicture(&picture)) {
2545 return; // the device has rendered the entire picture 2545 return; // the device has rendered the entire picture
2546 } 2546 }
2547 } 2547 }
2548 2548
2549 picture.draw(this); 2549 picture.draw(this);
2550 } 2550 }
2551 2551
2552 /////////////////////////////////////////////////////////////////////////////// 2552 ///////////////////////////////////////////////////////////////////////////////
2553 /////////////////////////////////////////////////////////////////////////////// 2553 ///////////////////////////////////////////////////////////////////////////////
2554 2554
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
2642 if (!bitmap.installPixels(info, pixels, rowBytes)) { 2642 if (!bitmap.installPixels(info, pixels, rowBytes)) {
2643 return NULL; 2643 return NULL;
2644 } 2644 }
2645 2645
2646 // should this functionality be moved into allocPixels()? 2646 // should this functionality be moved into allocPixels()?
2647 if (!bitmap.info().isOpaque()) { 2647 if (!bitmap.info().isOpaque()) {
2648 bitmap.eraseColor(0); 2648 bitmap.eraseColor(0);
2649 } 2649 }
2650 return SkNEW_ARGS(SkCanvas, (bitmap)); 2650 return SkNEW_ARGS(SkCanvas, (bitmap));
2651 } 2651 }
OLDNEW
« no previous file with comments | « include/gpu/SkGpuDevice.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698