support direct writing to top layer, and hide getTopLayer()

this should remove many of the chrome callers that today call
accessBitmap on the toplayer, so they can read/write those pixels.

The ultimate fix will be to support custom allocation of raster layers
(via GDI/cairo/mac) so we can remove PlatformDevice subclassing in
skia/ext

BUG=skia:
R=bsalomon@google.com, scroggo@google.com

Review URL: https://codereview.chromium.org/197433002

git-svn-id: http://skia.googlecode.com/svn/trunk@13774 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/rrects.cpp b/gm/rrects.cpp
index a79ff54..6c63af9 100644
--- a/gm/rrects.cpp
+++ b/gm/rrects.cpp
@@ -66,12 +66,8 @@
 
     virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
 #if SK_SUPPORT_GPU
-        SkBaseDevice* device = canvas->getTopDevice();
-        GrContext* context = NULL;
-        GrRenderTarget* rt = device->accessRenderTarget();
-        if (NULL != rt) {
-            context = rt->getContext();
-        }
+        GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
+        GrContext* context = rt ? rt->getContext() : NULL;
         if (kEffect_Type == fType && NULL == context) {
             return;
         }